<?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>ActionScript Scraps</title>
	<atom:link href="http://blog.sitedaniel.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sitedaniel.com</link>
	<description>Flash, Flex and AIR development</description>
	<lastBuildDate>Tue, 07 Sep 2010 21:57:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>UK Postcode Mapper Firefox extension is now open-source</title>
		<link>http://blog.sitedaniel.com/2010/09/uk-postcode-mapper-firefox-extension-is-now-open-source/</link>
		<comments>http://blog.sitedaniel.com/2010/09/uk-postcode-mapper-firefox-extension-is-now-open-source/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 21:54:18 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[open-source]]></category>

		<guid isPermaLink="false">http://blog.sitedaniel.com/?p=651</guid>
		<description><![CDATA[I have now made the UK Postcode Mapper Firefox extension open source, after a user suggestion on this blog. I initially decided to create this extension as a way to learn more about Firefox and javascript. Since the first build I have updated it twice, but don't have time to maintain it anymore, so making [...]]]></description>
			<content:encoded><![CDATA[<p>I have now made the <a href="https://addons.mozilla.org/en-US/firefox/addon/10413/">UK Postcode Mapper</a> Firefox extension open source, after a user suggestion on this blog. I initially decided to create this extension as a way to learn more about Firefox and javascript. Since the first build I have updated it twice, but don't have time to maintain it anymore, so making it open-source makes perfect sense.<br />
The source can be access on github at this location:<br />
<a href="http://github.com/danjp/ukpostcodemapper">http://github.com/danjp/ukpostcodemapper</a></p>
<p>The license info is in the README file.<br />
If you would like to get involved in publishing / updating this project at mozilla.org, please <a href="mailto:daniel@sitedaniel.com">email me</a>  and I will add you as a new Author.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sitedaniel.com/2010/09/uk-postcode-mapper-firefox-extension-is-now-open-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Waiting for Adobe Flash Player to connect to debugger</title>
		<link>http://blog.sitedaniel.com/2010/09/waiting-for-adobe-flash-player-to-connect-to-debugger/</link>
		<comments>http://blog.sitedaniel.com/2010/09/waiting-for-adobe-flash-player-to-connect-to-debugger/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 21:15:31 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[debugger]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[flashbuilder]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://blog.sitedaniel.com/?p=646</guid>
		<description><![CDATA[Recently a FlashBuilder project I was working on just stopped compiling using the debugger. The program would just hang with the build progress stuck on 57%. I tried many things to fix this, including uninstalling and reinstalling the debug versions of the Flash player without any luck. Eventually I found that the player that was [...]]]></description>
			<content:encoded><![CDATA[<p>Recently a FlashBuilder project I was working on just stopped compiling using the debugger. The program would just hang with the build progress stuck on 57%. I tried many things to fix this, including uninstalling and reinstalling the debug versions of the Flash player without any luck. Eventually I found that the player that was launching was not the Debug player but the Release build. I discovered that once I changed the file preferences for SWF files it would debug again.<br />
To do this on a Mac, select "Open with...", choose "Other...", select the Debug player and check the "Always Open With" checkbox.<br />
There is another method document on <a href="http://stackoverflow.com/questions/2191091/waiting-for-flash-player-to-connect-to-debugger/">StackOverflow</a> that I haven't tried.<br />
Mac OSX / FlashBuilder 4</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sitedaniel.com/2010/09/waiting-for-adobe-flash-player-to-connect-to-debugger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arranging objects in a grid</title>
		<link>http://blog.sitedaniel.com/2010/08/arranging-objects-in-a-grid/</link>
		<comments>http://blog.sitedaniel.com/2010/08/arranging-objects-in-a-grid/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 16:03:17 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[align]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[modulo]]></category>

		<guid isPermaLink="false">http://blog.sitedaniel.com/?p=622</guid>
		<description><![CDATA[There are many ways to arrange objects in a grid using ActionScript and some ways of doing this are easier than others. The following way I have found is the easiest. If you loop through all of your objects using a for(var i...) loop or something similar, you can set the x and y position [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.sitedaniel.com/wp-content/uploads/2010/08/Screen-shot-2010-08-23-at-16.57.56.png" alt="" title="grid" width="166" height="87" class="alignright size-full wp-image-633" />There are many ways to arrange objects in a grid using ActionScript and some ways of doing this are easier than others. The following way I have found is the easiest.<br />
If you loop through all of your objects using a for(var i...) loop or something similar, you can set the x and y position of each one using only one line of code:</p>
<p><code>
<pre class="actionscript"><span style="color: #808080; font-style: italic;">// inside a for(var i:int...) loop</span>
gridObj.<span style="color: #006600;">x</span> = START_X + <span style="color: #66cc66;">&#40;</span>i % COLUMNS<span style="color: #66cc66;">&#41;</span> * <span style="color: #66cc66;">&#40;</span>PAD_X + gridObj.<span style="color: #0066CC;">width</span><span style="color: #66cc66;">&#41;</span>;
gridObj.<span style="color: #006600;">y</span> = START_Y + <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">floor</span><span style="color: #66cc66;">&#40;</span>i / COLUMNS<span style="color: #66cc66;">&#41;</span> * <span style="color: #66cc66;">&#40;</span>PAD_Y + gridObj.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
<p></code></p>
<p>(COLUMNS is the number of required columns, PAD_X and PAD_Y are padding between objects along each axis.)<br />
This uses the <em><a href="http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/operators.html#modulo">modulo</a></em> (%) operator to determine the remainder of the division of the iterator and the number of columns. This is used for the X position of each object. The y position is calculated the other way, using Math.floor to get the highest exact number of divisions these two numbers will produce.<br />
Note: <em>int()</em> can also be used instead of <em>Math.floor()</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sitedaniel.com/2010/08/arranging-objects-in-a-grid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a simple Load Indicator / preloader</title>
		<link>http://blog.sitedaniel.com/2010/08/creating-a-simple-load-indicator/</link>
		<comments>http://blog.sitedaniel.com/2010/08/creating-a-simple-load-indicator/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 16:56:41 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[loadindicator]]></category>
		<category><![CDATA[preloader]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[util]]></category>

		<guid isPermaLink="false">http://blog.sitedaniel.com/?p=604</guid>
		<description><![CDATA[Here is a handy class to display a simple spinning load indicator / preload animation while your content is loading or transitioning. This demo uses the bit101 minimalcomps to show how flexible and configurable this class is. Use this demo to set up the style for your project, then hit the "copy" button to copy [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a handy class to display a simple spinning load indicator / preload animation while your content is loading or transitioning. This demo uses the bit101 <a href="http://www.minimalcomps.com/">minimalcomps</a> to show how flexible and configurable this class is.</p>
<p><a href="http://blog.sitedaniel.com/demo/loadindicator/LoadIndicatorGenerator.swf" rel="shadowbox;height=200;width=400"><img src="http://blog.sitedaniel.com/demo/loadindicator/loadindicator.png" alt="loadindicator" title="loadindicator" width="400" height="200" class="alignnone size-full wp-image-563" /></a></p>
<p>Use this demo to set up the style for your project, then hit the "copy" button to copy the configuration to your clipboard.</p>
<p><a href="http://blog.sitedaniel.com/demo/loadindicator/LoadIndicatorGenerator.swf" rel="shadowbox;height=200;width=400">click to launch</a></p>
<p>Usage:</p>
<pre>
// create
_loadInd = new LoadIndicator(this, 75, 75);

// remove
_loadInd.destroy();
</pre>
<p>download <a href="http://blog.sitedaniel.com/demo/loadindicator/LoadIndicator.as">LoadIndicator.as</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sitedaniel.com/2010/08/creating-a-simple-load-indicator/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Site launch: The Megané Experiment</title>
		<link>http://blog.sitedaniel.com/2010/07/site-launch-the-megane-experiment/</link>
		<comments>http://blog.sitedaniel.com/2010/07/site-launch-the-megane-experiment/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 11:15:35 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[puremvc]]></category>
		<category><![CDATA[renault]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.sitedaniel.com/?p=600</guid>
		<description><![CDATA[This was a very quick build and a steep learning curve with the Facebook Graph API integration. The site is PureMVC, AS3 and XML driven. Also it integrates with a Renault server for saving information about each user and their betting scores for the competition. An interesting campaign with some great prizes available, but be [...]]]></description>
			<content:encoded><![CDATA[<p>This was a very quick build and a steep learning curve with the Facebook Graph API integration. The site is PureMVC, AS3 and XML driven. Also it integrates with a Renault server for saving information about each user and their betting scores for the competition.<br />
An interesting campaign with some great prizes available, but be quick as this is only for 9 more days.</p>
<p><a href="http://www.themeganeexperiment.com/"><img src="http://blog.sitedaniel.com/wp-content/uploads/2010/07/renault_megane.jpg" alt="" title="renault_megane" width="400" height="224" class="alignnone size-full wp-image-601" /></a></p>
<p><a href="http://www.themeganeexperiment.com/">link</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sitedaniel.com/2010/07/site-launch-the-megane-experiment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site launch: Bodyshop Rainforest range</title>
		<link>http://blog.sitedaniel.com/2010/07/bodyshop/</link>
		<comments>http://blog.sitedaniel.com/2010/07/bodyshop/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 14:16:22 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3.0]]></category>
		<category><![CDATA[dynamic text]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[puremvc]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.sitedaniel.com/?p=589</guid>
		<description><![CDATA[This site is built using the PureMVC framework (AS3.0) and is XML driven to support multiple languages. This is the site I wrote the dynamic text around an ellipse code for, as it is used for the range menu. It is a great looking site with some nice water and light effects going on in [...]]]></description>
			<content:encoded><![CDATA[<p>This site is built using the <a href="http://puremvc.org/">PureMVC</a> framework (AS3.0) and is XML driven to support multiple languages. This is the site I wrote the <a href="http://blog.sitedaniel.com/2010/06/dynamic-text-around-an-ellipse/">dynamic text around an ellipse</a> code for, as it is used for the range menu.<br />
It is a great looking site with some nice water and light effects going on in the background.</p>
<p><a href="http://www.thebodyshop.co.uk/_en/_gb/catalog/list.aspx?ParentCatCode=C_Hair&amp;CategoryCode=C_Hair_NEWRainForestHaircare&amp;CategoryPath=C_Hair^C_Hair_NEWRainForestHaircare&amp;FilterTopicCode=Hair^NEW%20Rainforest%20Haircare&amp;CheckoutFilterType=1"><img src="http://blog.sitedaniel.com/wp-content/uploads/2010/07/bodyshop_rainforest.jpg" alt="" title="bodyshop_rainforest" width="400" height="212" class="alignnone size-full wp-image-590" /></a></p>
<p><a href="http://www.thebodyshop.co.uk/_en/_gb/catalog/list.aspx?ParentCatCode=C_Hair&CategoryCode=C_Hair_NEWRainForestHaircare&CategoryPath=C_Hair^C_Hair_NEWRainForestHaircare&FilterTopicCode=Hair^NEW%20Rainforest%20Haircare&CheckoutFilterType=1">link</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sitedaniel.com/2010/07/bodyshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site launch: HP Make it big</title>
		<link>http://blog.sitedaniel.com/2010/07/hp-make-it-big/</link>
		<comments>http://blog.sitedaniel.com/2010/07/hp-make-it-big/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 14:08:21 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3.0]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.sitedaniel.com/?p=585</guid>
		<description><![CDATA[It has been a while since I have been able to update this blog and in that time I have completed about 5 different sites at multiple agencies. I am going to make an effort to get them all up here, but it has been hard to keep track of what has gone live and [...]]]></description>
			<content:encoded><![CDATA[<p>It has been a while since I have been able to update this blog and in that time I have completed about 5 different sites at multiple agencies. I am going to make an effort to get them all up here, but it has been hard to keep track of what has gone live and what is still being deployed. The first small site that is actually live is <a href="http://h41112.www4.hp.com/promo/makeitbig/uk/en/">HP Make it big</a>.<br />
This is built to support multiple European languages and is driven by XML.</p>
<p><a href="http://h41112.www4.hp.com/promo/makeitbig/uk/en/"><img src="http://blog.sitedaniel.com/wp-content/uploads/2010/07/hp_big.jpg" alt="" title="HP Make it big" width="400" height="230" class="alignnone size-full wp-image-586" /></a></p>
<p><a href="http://h41112.www4.hp.com/promo/makeitbig/uk/en/">link</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sitedaniel.com/2010/07/hp-make-it-big/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Launch: Nissan Qashqai differentiation</title>
		<link>http://blog.sitedaniel.com/2010/06/site-launch-nissan-qashqai-differentiation/</link>
		<comments>http://blog.sitedaniel.com/2010/06/site-launch-nissan-qashqai-differentiation/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 21:10:34 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[nissan]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[puremvc]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.sitedaniel.com/?p=578</guid>
		<description><![CDATA[This site for Nissan finally launched last week almost 4 months after I completed the build. It is AS3 and uses the PureMVC framework. It is to help customers compare the two different Qashqai models and their respective features. I really like the way the paint splashes around in this campaign. link]]></description>
			<content:encoded><![CDATA[<p>This site for Nissan finally launched last week almost 4 months after I completed the build. It is AS3 and uses the <a href="http://puremvc.org/">PureMVC</a> framework. It is to help customers compare the two different Qashqai models and their respective features. I really like the way the paint splashes around in this campaign.</p>
<p><a href="http://www.nissan.co.uk/#vehicles/crossovers/qashqai-differentiation"><img src="http://blog.sitedaniel.com/wp-content/uploads/2010/06/nissan_qq.jpg" alt="" title="nissan_qq" width="400" height="201" class="alignnone size-full wp-image-579" /></a></p>
<p><a href="http://www.nissan.co.uk/#vehicles/crossovers/qashqai-differentiation">link</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sitedaniel.com/2010/06/site-launch-nissan-qashqai-differentiation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Text around an Ellipse</title>
		<link>http://blog.sitedaniel.com/2010/06/dynamic-text-around-an-ellipse/</link>
		<comments>http://blog.sitedaniel.com/2010/06/dynamic-text-around-an-ellipse/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 22:06:34 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[CS5]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[dynamic text]]></category>
		<category><![CDATA[ellipse]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[textfield]]></category>

		<guid isPermaLink="false">http://blog.sitedaniel.com/?p=562</guid>
		<description><![CDATA[Recently I had to create a dynamic menu that required some text to wrap around an ellipse. Getting the rotation correct involved calculating the angle of the tangent around the ellipse which was a challenge. Also the letter spacing was tricky and I don't think I have the best solution for this but it seems [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had to create a dynamic menu that required some text to wrap around an ellipse. Getting the rotation correct involved calculating the angle of the tangent around the ellipse which was a challenge. Also the letter spacing was tricky and I don't think I have the best solution for this but it seems to work quite well.</p>
<p>Here is a quick demo I put together tonight of it in action</p>
<p><a href="http://blog.sitedaniel.com/demo/ellipticaltext/ellipticaltext.swf" rel="shadowbox;height=350;width=400"><img src="http://blog.sitedaniel.com/wp-content/uploads/2010/06/elliptical_text.png" alt="ellipticaltext" title="ellipticaltext" width="400" height="350" class="alignnone size-full wp-image-563" /></a></p>
<p><a href="http://blog.sitedaniel.com/demo/ellipticaltext/ellipticaltext.swf" rel="shadowbox;height=350;width=400">click to launch</a><br />
<a href="http://blog.sitedaniel.com/demo/ellipticaltext/ellipticaltext_src.zip">download source CS5</a> (also requires <a href="http://www.minimalcomps.com/">minimalcomps</a> Slider source)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sitedaniel.com/2010/06/dynamic-text-around-an-ellipse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>site launch: GE Memorial Day Emissions</title>
		<link>http://blog.sitedaniel.com/2010/05/site-launch-ge-memorial-day-emissions/</link>
		<comments>http://blog.sitedaniel.com/2010/05/site-launch-ge-memorial-day-emissions/#comments</comments>
		<pubDate>Sun, 30 May 2010 22:08:26 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3.0]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[infographic]]></category>
		<category><![CDATA[portfolio]]></category>

		<guid isPermaLink="false">http://blog.sitedaniel.com/?p=555</guid>
		<description><![CDATA[I've been a long-time admirer of the work of David McCandless (http://www.informationisbeautiful.net/), and I finally had the chance to build one of his infographics in Flash. The project displays projected CO2 emissions from car journeys on Memorial Day across America. You can choose between 3 region groupings and 3 fuel types. The numbers involved are [...]]]></description>
			<content:encoded><![CDATA[<p>I've been a long-time admirer of the work of <a href="http://www.davidmccandless.com/">David McCandless (<a href="http://www.informationisbeautiful.net/">http://www.informationisbeautiful.net/</a>)</a>, and I finally had the chance to build one of his infographics in Flash. The project displays projected CO2 emissions from car journeys on Memorial Day across America. You can choose between 3 region groupings and 3 fuel types. The numbers involved are mind-boggling!</p>
<p><a href="http://www.ge.com/visualization/driving_emissions/"><img src="http://blog.sitedaniel.com/wp-content/uploads/2010/05/ge_emissions.png" alt="" title="ge_emissions" width="400" height="296" class="alignnone size-full wp-image-556" /></a></p>
<p><a href="http://www.ge.com/visualization/driving_emissions/">GE Memorial Day emissions link</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sitedaniel.com/2010/05/site-launch-ge-memorial-day-emissions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
