<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pinter Industries &#187; Code Tricks</title>
	<atom:link href="http://pinter-industries.com/weblog/category/code-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://pinter-industries.com</link>
	<description>Notes from a developer of fortune</description>
	<lastBuildDate>Thu, 13 Oct 2011 07:19:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Flash is odd sometimes</title>
		<link>http://pinter-industries.com/weblog/2010/09/flash-is-odd-sometimes/</link>
		<comments>http://pinter-industries.com/weblog/2010/09/flash-is-odd-sometimes/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 02:36:56 +0000</pubDate>
		<dc:creator>ian</dc:creator>
				<category><![CDATA[Code Tricks]]></category>

		<guid isPermaLink="false">http://pinter-industries.com/?p=158</guid>
		<description><![CDATA[Like when you are embedding a swf in pretty much any non-IE browser (I had FF, Chrome, and Opera installed) and if you set the scale property after you set the salign, it ignores salign. Not sure why, but it&#8217;s really odd. So just make sure to place scale, and then salign when embedding.]]></description>
			<content:encoded><![CDATA[<p>Like when you are embedding a swf in pretty much any non-IE browser (I had FF, Chrome, and Opera installed) and if you set the scale property after you set the salign, it ignores salign. Not sure why, but it&#8217;s really odd. So just make sure to place scale, and then salign when embedding.</p>
]]></content:encoded>
			<wfw:commentRss>http://pinter-industries.com/weblog/2010/09/flash-is-odd-sometimes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CS5 flashvars</title>
		<link>http://pinter-industries.com/weblog/2010/06/cs5-flashvars/</link>
		<comments>http://pinter-industries.com/weblog/2010/06/cs5-flashvars/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 22:57:25 +0000</pubDate>
		<dc:creator>ian</dc:creator>
				<category><![CDATA[Code Tricks]]></category>

		<guid isPermaLink="false">http://pinter-industries.com/?p=149</guid>
		<description><![CDATA[I&#8217;m posting this up here because I hope someone will find it and discover they did not do something stupid, Adobe did. Basically if you want to use any flashvars in Flash CS5, you must use the work around provided here: http://forums.adobe.com/thread/644057. Basically the new built in preloader (which I&#8217;m not sure if you can [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m posting this up here because I hope someone will find it and discover they did not do something stupid, Adobe did. Basically if you want to use any flashvars in Flash CS5, you must use the work around provided here: <a href="http://forums.adobe.com/thread/644057">http://forums.adobe.com/thread/644057</a>. Basically the new built in preloader (which I&#8217;m not sure if you can disable or not) causes all flashvars specified to be set to undefined. Not a handy feature at all. Not sure how that one slipped passed testing, unless no one uses flashvars anymore, but that must not be case then is it?</p>
]]></content:encoded>
			<wfw:commentRss>http://pinter-industries.com/weblog/2010/06/cs5-flashvars/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>On the Boards</title>
		<link>http://pinter-industries.com/weblog/2010/02/on-the-boards/</link>
		<comments>http://pinter-industries.com/weblog/2010/02/on-the-boards/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 19:28:39 +0000</pubDate>
		<dc:creator>ian</dc:creator>
				<category><![CDATA[Code Tricks]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://pinter-industries.com/?p=132</guid>
		<description><![CDATA[Forgot to make a note about probably the coolest site I&#8217;ve worked on, ontheboards.tv. It launched three weeks ago and seems to be doing well. It survived the first weekend even with an article in the New York Times about the site. It was neat to work on a large scale project with lots of [...]]]></description>
			<content:encoded><![CDATA[<p>Forgot to make a note about probably the coolest site I&#8217;ve worked on, <a href="http://ontheboards.tv">ontheboards.tv</a>. It launched three weeks ago and seems to be doing well. It survived the first weekend even with an <a href="http://www.nytimes.com/2010/01/24/arts/dance/24boards.html">article</a> in the New York Times about the site. It was neat to work on a large scale project with lots of custom functionality. The site may look pretty simple, but there is quite a bit happening behind the scenes.</p>
<p>One thing we discovered while developing the media player is the FLVPlayback component doesn&#8217;t always raise the Buffering/Playing/PausedStateEntered events when those states are entered. Makes it difficult to properly handle those situations when you don&#8217;t know you are in them. Turns out if you use the StateChange event and check the event state, you always know what state the FLVPlayback component is in. No idea why that happens, but if you find yourself building a custom video player, keep that in mind.</p>
<p><br/><br />
<em>Edit:</em> Turns out On the Boards found this post and linked it on their blog. In the interest of providing some more details I wrote <a href="/weblog/2010/02/guess-ill-fill-in-some-details">another post</a> to compliment this one.</p>
]]></content:encoded>
			<wfw:commentRss>http://pinter-industries.com/weblog/2010/02/on-the-boards/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Deciding on coding standards</title>
		<link>http://pinter-industries.com/weblog/2009/07/deciding-on-coding-standards/</link>
		<comments>http://pinter-industries.com/weblog/2009/07/deciding-on-coding-standards/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 22:19:57 +0000</pubDate>
		<dc:creator>ian</dc:creator>
				<category><![CDATA[Code Tricks]]></category>

		<guid isPermaLink="false">http://pinter-industries.com/?p=74</guid>
		<description><![CDATA[As everyone knows coding standards quickly become a religious debate as soon as there are more than a single developer working on a piece of code. Luckily the people I work with share the same sense of clean coding standards as I do. However the other day we had a dissagreement about what to name [...]]]></description>
			<content:encoded><![CDATA[<p>As everyone knows coding standards quickly become a religious debate as soon as there are more than a single developer working on a piece of code. Luckily the people I work with share the same sense of clean coding standards as I do. </p>
<p>However the other day we had a dissagreement about what to name the event parameter in a handler, &#8216;e&#8217; or &#8216;evt&#8217;. Neither of us had a strong argument for using one over the other. So we ended up playing Rock, Paper, Scissors. It is the perfect solution for deciding on issues that have little to no impact on how the code actually works. It enables a decision to be quickly made, and hopefully the parties involved agree that RPS is a fair and balanced method.</p>
<p>If you want to get super geeky, you could play <a href="http://www.samkass.com/theories/RPSSL.html">Rock, Paper, Scissors, Spock, Lizard</a>. I just found out about that the other day because of a t-shirt on <a href="http://www.thinkgeek.com/tshirts-apparel/unisex/generic/b597/">Think Geek</a>. I haven&#8217;t tried playing yet, it may take a while to remember what beats what now.</p>
]]></content:encoded>
			<wfw:commentRss>http://pinter-industries.com/weblog/2009/07/deciding-on-coding-standards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A neat Joomla trick</title>
		<link>http://pinter-industries.com/weblog/2009/01/a-neat-joomla-trick/</link>
		<comments>http://pinter-industries.com/weblog/2009/01/a-neat-joomla-trick/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 21:46:16 +0000</pubDate>
		<dc:creator>ian</dc:creator>
				<category><![CDATA[Code Tricks]]></category>
		<category><![CDATA[Joomla]]></category>

		<guid isPermaLink="false">http://pinter-industries.com/blog/?p=10</guid>
		<description><![CDATA[I&#8217;m in the process of making a Joomla site for the first time and I needed to be able to have different pages of the site have different styles. I looked around and wasn&#8217;t able to find any examples that actually worked for my needs. I found some info about the Page Class Suffix option, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in the process of making a Joomla site for the first time and I needed to be able to have different pages of the site have different styles. I looked around and wasn&#8217;t able to find any examples that actually worked for my needs. I found some info about the Page Class Suffix option, but nothing about how to really use it. I talked with Brian over at Heavy Robot, since he has actually made some Joomla sites and he whipped up this bit of code that fits my needs perfectly. Basically it uses the Page Class Suffix variable from the menu system as the class name on the body. You can then add any styles you need to your basic style sheet and have all sorts of different page styles.</p>
<p>Place this PHP block in the head of the index.php file of your template. I used the built in template editor, which also points out which template you are currently using.<br />
<code><br />
&lt;?php<br />
     $menus = &amp;JSite::getMenu();<br />
     $menu = $menus-&gt;getActive();<br/><br />
     if (is_object( $menu ))<br />
          $params = new JParameter( $menu-&gt;params );<br />
          $pageclass = $params-&gt;get( 'pageclass_sfx' );<br />
?&gt;</code><br />
 <br />
Then replace the open body tag with this block, also in the index.php file. Or you can use just the part where the page class is written out if you want to have multiple classes on the body.</p>
<p><code>&lt;body id="bd" class="&lt;?php echo $pageclass;?&gt;"&gt;</code></p>
<p>Now whenever you create a new menu item in the menu manager, add a value for the Page Class Suffix (under the Parameters (System) expando-box) for any pages that need different styles.</p>
]]></content:encoded>
			<wfw:commentRss>http://pinter-industries.com/weblog/2009/01/a-neat-joomla-trick/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

