<?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>Pixelbox &#187; ActionScript</title>
	<atom:link href="http://www.pixelbox.net/category/development/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pixelbox.net</link>
	<description>Pixelbox, technology development and photography.</description>
	<lastBuildDate>Thu, 08 Apr 2010 16:35:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Adding plugins to Flash Builder 4</title>
		<link>http://www.pixelbox.net/2010/02/19/adding-plugins-to-flash-builder-4/</link>
		<comments>http://www.pixelbox.net/2010/02/19/adding-plugins-to-flash-builder-4/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 15:18:57 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.pixelbox.net/?p=407</guid>
		<description><![CDATA[At the time of writing Flash Builder 4 doesn&#8217;t ship with the default plugin installers, which makes adding things like ANT a bit of a chore. UPDATE: The latest RC for Flash Builder 4 now supports plugins again. I have updated the links to include the Eclipse plugin URL for each plugin. This post is [...]]]></description>
			<content:encoded><![CDATA[<p>At the time of writing Flash Builder 4 doesn&#8217;t ship with the default plugin installers, which makes adding things like ANT a bit of a chore.</p>
<p>UPDATE: The latest RC for Flash Builder 4 now supports plugins again. I have updated the links to include the Eclipse plugin URL for each plugin.</p>
<p>This post is as much a reminder to me for future builds as it is for anyone else sick of having to manually look up where to down load the most common plugins every time they update. Start by downloading all the plug in files:</p>
<h3>ANT</h3>
<p>To get ANT installed you need to download and install JDT for eclipse.</p>
<p>Manual install: <a href="http://download.eclipse.org/eclipse/downloads/drops/R-3.5.1-200909170800/index.php">http://download.eclipse.org/eclipse/downloads/drops/R-3.5.1-200909170800/index.php</a></p>
<p>Eclipse update URL:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">http://download.eclipse.org/releases/galileo/</pre></div></div>

</p>
<h3>Flex Formatter</h3>
<p>Once you have used Flex Formatter you will never look back. It automatically formats your code, making you look like you have spent lots of time lining everything up. You can download the plugin files here <a href="http://sourceforge.net/projects/flexformatter/">http://sourceforge.net/projects/flexformatter/</a></p>
<p>Eclipse update URL:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">http://flexformatter.googlecode.com/svn/trunk/FlexFormatter/FlexPrettyPrintCommandUpdateSite</pre></div></div>

</p>
<h3>subclipse</h3>
<p>Subclipse is a must for anyone using SVN in their projects. It stops you running into a lot of problems, like turning up .svn files in search results. You can get it here<br />
<a href="http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240">http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240</a></p>
<p>Eclipse update URL:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">http://subclipse.tigris.org/update_1.6.x</pre></div></div>

</p>
<p>For the manual install, once you have downloaded and unzipped these files copy the content of their plugin folder to the plugin folder in your Flash Builder 4 directory. You may also want to copy the features folder content to the features folder in the Flash Builder 4 folder too.</p>
<p>Once done restart Flash Builder and everything should be working. </p>
<p>Also be sure to check out SourceMate (currently in Beta).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelbox.net/2010/02/19/adding-plugins-to-flash-builder-4/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Caching gotcha in AIR</title>
		<link>http://www.pixelbox.net/2009/10/02/caching-gotcha-in-air/</link>
		<comments>http://www.pixelbox.net/2009/10/02/caching-gotcha-in-air/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 13:38:30 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.pixelbox.net/?p=379</guid>
		<description><![CDATA[Every had a problem with Adobe AIR caching your HTTP requests? Read on...]]></description>
			<content:encoded><![CDATA[<p>I recently ran into a problem in AIR, where my application wasn&#8217;t updating content it was getting from an HTTP request even though the page had changed.</p>
<p>I was able to use <a href="http://www.charlesproxy.com/">Charles Proxy</a> to see that the application wasn&#8217;t even making the requests to the server, meaning it must be an issue with AIR rather than local or remote DNS, or web servers.</p>
<p>My requests were being made by the HTTPService class, and I couldn&#8217;t find any properties of methods that where related to caching, however I did find that URLRequest had two properties, useCache and cacheResponce.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> urlRequest<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">URLRequest</span> = _new <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
urlRequest.cacheResponse = <span style="color: #0033ff; font-weight: bold;">false</span>;
urlRequest.useCache = <span style="color: #0033ff; font-weight: bold;">false</span>;</pre></div></div>

<p>
This is quite handy, although it didn&#8217;t seem to work for me, and also wasn&#8217;t idea for the situation I was in. After doing some digging on the web I found the classic solution of adding a random number to the end of the URL
</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">&nbsp;
&nbsp;
&nbsp;
 <span style="color: #6699cc; font-weight: bold;">var</span> urlRequest<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">URLRequest</span> = _new <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">'http://www.example.com/'</span><span style="color: #000000;">&#41;</span>;
 urlRequest.<span style="color: #004993;">url</span> <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #990000;">'?nocache='</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight:bold;">100</span>;</pre></div></div>

<p>
Again this isn&#8217;t ideal and could lead to problems, especially if you don&#8217;t know what server or URL the requests may be sent for. There is a chance the nocache (or any) variable could cause problems.
</p>
<p>
Eventually I noticed that the URLRequest&#8217;s cacheResponse entry on livedocs had a &#8220;See also&#8221; pointing to <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/URLRequestDefaults.html#cacheResponse">flash.net.URLRequestDefaults.cacheResponse</a>. This solved all my problems, and is essentially a default for all URL requests made my AIR.
</p>
<p>
The properties appear to be static variables so you can set them like so:
</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;">&nbsp;
<span style="color: #009900;">// Turn caching off for AIR</span>
URLRequestDefaults.cacheResponse = <span style="color: #0033ff; font-weight: bold;">false</span>;
URLRequestDefaults.useCache = <span style="color: #0033ff; font-weight: bold;">false</span>;</pre></td></tr></table></div>

<p>
This only needs to be done once, so you can add it to your applications start up cycle.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelbox.net/2009/10/02/caching-gotcha-in-air/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extended AIR App Updater</title>
		<link>http://www.pixelbox.net/2009/09/02/extended-air-app-updater/</link>
		<comments>http://www.pixelbox.net/2009/09/02/extended-air-app-updater/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 17:13:11 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[UX]]></category>

		<guid isPermaLink="false">http://www.pixelbox.net/?p=347</guid>
		<description><![CDATA[Ever wished there was a way to force app updates using the ApplicationUpdaterUI? Now there is.]]></description>
			<content:encoded><![CDATA[<p>I have always used Adobe&#8217;s <a href="http://www.adobe.com/devnet/flex/tourdeflex/langref/air/update/ApplicationUpdaterUI.html">ApplicationUpdater</a> in my AIR apps, either with or without the UI. However every time I do I always find I need the functionality to force the user to update. This is normally due to an important feature or bug fix that I need pushed out to users, or just to make sure those users who never update don&#8217;t get too far behind (I recently found my dad had never updated any of his iPhone apps).
</p>
<p><div id="attachment_360" class="wp-caption alignnone" style="width: 310px"><img src="http://www.pixelbox.net/wp-content/uploads/2009/09/Picture-2-300x149.png" alt="Update framework" title="Update" width="300" height="149" class="size-medium wp-image-360" /><p class="wp-caption-text">Update framework</p></div>
<p>
When using the ApplicationUpdater (without the UI), you can easily force the install of all updates, but this isn&#8217;t very user friendly, and not a great experience. Often it&#8217;s far too time consuming to write your own UI for the update framework, so ideally I wanted to create a way of supporting required updates whilst using the existing UI as much as possible.
</p>
<p>
In order to do this I wrote a decorator for the ApplicationUpdaterUI which added the new event RequiredStatusUpdateEvent. This is dispatched when the updateDescriptor file is downloaded and includes the value of a new node called required (which you need to add to your update.xml file):
</p>
<p>
<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span> 
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;update</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://ns.adobe.com/air/framework/update/description/1.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span> 
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://www.pixelbox.net/demos/extendedAppUpdater/ExampleAirApp-2.air<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		Version 2
		- Lots of great new features
		- Required security patch
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;required<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/required<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/update<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><small>The text &#8220;true&#8221; will translate into a Boolean set to true, anything else will be false.</small></p>
</p>
<p>
You can then add a listener for the  (along with any default events), to tell your user they have to update to the new required version. This can be as simple as:
</p>

<div class="wp_syntax"><div class="code"><pre class="applicationscript3" style="font-family:monospace;">&nbsp;
           private function onUpdate(event:RequiredStatusUpdateEvent):void
            {
                if (event.required &amp;&amp; event.available)
                    // Required update available 
                else
                    // There isn't a required update, so leave it up to the ApplicationUpdaterUI
            }</pre></div></div>

<p>
From a UX point of view this works rather well. You can choose how your application responds to a required update, and don&#8217;t need to force the install in the background and restart the app. I like to change the state of the app, as well as letting the ApplicationUpdaterUI window open. If the user upgrades through the default UI, great, if not they will be presented with a new app state, telling them there is a required update, perhaps even why it&#8217;s important. You may even want to let them do some things but not others (such as letting them save their work, or finishing their current workflow). Either way it gives your app the choice of how it wants to behave.
</p>
<p>I have created a little example app (with view source enabled) that uses the this code, as well as a .swc and the example app as a project.</p>
<ul>
<li><a href="http://www.pixelbox.net/demos/extendedAppUpdater/ExampleAirApp-1.air">Example AIR Application</a></li>
<li><a href="http://www.pixelbox.net/demos/extendedAppUpdater/ExtendedAppUpdater.swc">Extended Updater swc file</a></li>
<li><a href="http://www.pixelbox.net/demos/extendedAppUpdater/ExampleAirApp.zip"> Example Air App project</a></li>
<li><a href="http://www.pixelbox.net/demos/extendedAppUpdater/update.xml"> Example update descriptor XML file</a></li>
</ul>
<p>If you install the above air file, you will be able to check for updates and receive a required update. When this happens the app&#8217;s main function is disabled and a message displayed telling the user to upgrade.</p>
<p>Please let me know if you have any questions, or would like to add to this little framework, good luck. If you want to create your own without using the default UI check out <a href="http://www.blackpepper.co.uk/black-pepper-blog/Example-auto-updating-AIR-desktop-app.html">this article on Black Pepper</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelbox.net/2009/09/02/extended-air-app-updater/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Detecting if running in ADL</title>
		<link>http://www.pixelbox.net/2009/07/07/detecting-if-running-in-adl/</link>
		<comments>http://www.pixelbox.net/2009/07/07/detecting-if-running-in-adl/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 14:39:11 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.pixelbox.net/?p=317</guid>
		<description><![CDATA[A quick example of how to tell when an AIR application is running in debug mode. Allowing you to stop costly tasks when doing so.]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-318" title="adl" src="http://www.pixelbox.net/wp-content/uploads/2009/07/adl.png" alt="" width="160" height="108" /></p>
<p><strong><br />
NOTE: I have since discovered the Capabilities class that has a boolean called isDebugger. Therefore you can do this like so:</strong>
</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">Capabilities</span>.<span style="color: #004993;">isDebugger</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">'This app is running in the ADL'</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p><strong>Original post:</strong></p>
<p>I recently came across the situation where I wanted to detect if my AIR application was running, &#8220;for real&#8221; or running in debug mode (in the Adobe Debug Launcher ADL).</p>
<p>With a standard Flex &gt; SWF project you can change the HTML of the debug template to pass through a debug=true variable. However with an AIR project you don&#8217;t have this luxury.</p>
<p>The reason I want to do this, is I don&#8217;t want some things to happen when I&#8217;m debugging (such as sending stats to the server) and I don&#8217;t want to have custom variables or comment out code incase I forget to turn them back on before pushing live. By having a way of checking if the app is running in the ADL you can optionally stop things, safe in the knowledge that when they go live they will work.</p>
<p>I searched the web to see if there was a way to tell if AIR was running in debug mode, or in the ADL or was even a release build, but I couldn&#8217;t find a specific API call. What I did find is a number of methods that only worked if running in the ADL. All I had to do then was find one that returned different values depending on that fact. The Error class has a method getStackTrace() that return null if not running in the ADL and a string if it is, this was perfect and can be used like so:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Error</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #004993;">getStackTrace</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">'This app is running in the ADL'</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>This code isn&#8217;t perfect, in the future the getStackTrace method could start working when not running in the ADL. You could also combine a few ADL specific methods, for better piece of mind. If you know of a better solution please let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelbox.net/2009/07/07/detecting-if-running-in-adl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing the default loading screen in Flex</title>
		<link>http://www.pixelbox.net/2008/03/13/changing-the-default-loading-screen-in-flex/</link>
		<comments>http://www.pixelbox.net/2008/03/13/changing-the-default-loading-screen-in-flex/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 12:49:10 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.pixelbox.net/2008/03/13/changing-the-default-loading-screen-in-flex/</guid>
		<description><![CDATA[One of the first things you want to do when creating a Flex app is to remove all the default stuff, which makes your app look like everyone else&#8217;s. The most obvious default thing in Flex is that loading, progress initilisation bar you get before the application starts. Now before I start there is one [...]]]></description>
			<content:encoded><![CDATA[<p>
One of the first things you want to do when creating a Flex app is to remove all the default stuff, which makes your app look like everyone else&#8217;s. The most obvious default thing in Flex is that loading, progress initilisation bar you get before the application starts.
</p>
<p>
Now before I start there is one thing to look out for. I first wanted to change the background colour, and kept getting a flash of that Windows 98 turquoise before it change to my new colour&#8230; This had me really confused for a while, until I realised that the auto generated HTML that Flex Builder 3 creates has that same colour as it&#8217;s default background&#8230; Doh! (You can also get the compiler to change this, see the <a href="http://www.gotoandlearn.com/play?id=108">gotoAndLearn example</a> for more info)
</p>
<p>
Quite a few of the settings of the loading screen can be set through the mx:Application tag, in your Application Class&#8217;s MXML. The most obvious being the background colour. This is also where you can specify your own download screen, or as Adobe call it, &#8220;DownloadProgressBar&#8221;.
</p>
<p>
At the highest level a Flex application is a two frame movie clip, the first frame being the aforementioned, &#8220;DownloadProgressBar&#8221; and the second being your Application class. In order to draw images and a progress bar on your loading class thing, you will need to extend the Sprite class (like a movieclip without frames) and implement the IPreloaderDisplay. ( Holy object orientation Batman! Don&#8217;t worry you can just copy my example and ignore that if you want!)
</p>
<p>
When creating your own &#8220;DownloadProgressBar&#8221; you need to keep it lightweight, otherwise you will have to make a &#8220;DownloadProgressBar&#8221; for that! Also some elements of the Flex framework won&#8217;t be available when it starts, so don&#8217;t go too crazy!
</p>
<p>
The first step is to add this to the <mx :Application> tag in your Application&#8217;s MXML file<br />
</mx></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">preloader=<span style="color: #ff0000;">&quot;com.example.preloaders.myDownloadProgressBar&quot;</span></pre></div></div>

<p>
Once this is added your application will use your custom &#8220;DownloadProgressBar&#8221; Class, rather than the default one. This means you can do lots of stuff yourself with the information provided, such as total to download and total downloaded, in addition to some events called at various stages of initilisation.
</p>
<p>
<a href="http://www.pixelbox.net/demos/downloadProgressBar/MyDownloadProgressBar.as" title="Download example of my Download Progress Bar">Download the Download Progress Bar example class here</a>. I have commented as much as I can, and will try and put a demo together soon.</p>
<p />
<p>
Other examples:</p>
<ul>
<li>http://www.onflex.org/ted/2006/07/flex-2-preloaders-swf-png-gif-examples.php</li>
<li>http://flexiblemyself.blogspot.com/2007/10/custom-preloader.html</li>
<li>http://iamjosh.wordpress.com/2007/12/18/flex-custom-preloader/</li>
<li>https://defiantmouse.com/yetanotherforum.net/default.aspx?g=posts&#038;t=82</li>
<li>http://www.gotoandlearn.com/play?id=108</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelbox.net/2008/03/13/changing-the-default-loading-screen-in-flex/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>PolarClock</title>
		<link>http://www.pixelbox.net/2007/10/05/polarclock/</link>
		<comments>http://www.pixelbox.net/2007/10/05/polarclock/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 13:53:44 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.pixelbox.net/2007/10/05/polarclock/</guid>
		<description><![CDATA[I came across PolarClock today, a great flash clock that kind of rotates depending on the time. What was really interesting is that the developer has turned it into a screen saver using ScreenTime. When you change the settings on OS X you can see the flex app loading. Will have to try it out, [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.pixelbox.net/2007/10/05/polarclock/clockpng/' rel='attachment wp-att-222' title='clock.png'><img src='http://www.pixelbox.net/wp-content/uploads/2007/10/clock.thumbnail.png' alt='clock.png' /></a>
<p>
I came across <a href="http://blog.pixelbreaker.com/polarclock/">PolarClock</a> today, a great flash clock that kind of rotates depending on the time.
</p>
<p>
What was really interesting is that the developer has turned it into a screen saver using <a href="http://www.screentime.com/index.html?s=STFM300_saver">ScreenTime</a>. When you change the settings on OS X you can see the flex app loading.
</p>
<p>
Will have to try it out, but first I will need to make something worthy of a screen saver!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelbox.net/2007/10/05/polarclock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Caculating Dates in AS3</title>
		<link>http://www.pixelbox.net/2007/09/27/caculating-dates-in-as3/</link>
		<comments>http://www.pixelbox.net/2007/09/27/caculating-dates-in-as3/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 15:07:07 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.pixelbox.net/2007/09/27/caculating-dates-in-as3/</guid>
		<description><![CDATA[ ]]></description>
			<content:encoded><![CDATA[<p>
Here is a little example of how to return a date a set number of days from any given date in ActionScript 3 (Flex, AIR).
</p>
<p>
I used the example to return a set number of days since one of our issues launched, by sending the function the number of days and the starting date.
</p>
<p><pre>
<code>
/* This is a public static function so it can be called from my
utility class of useful converts and such! */

public static function returnDateXDaysFromY( x:Number , y:Date ):Date
{
  var xDaysFromY:Date = new Date(); // Date to return
  // I have removed a call to a function to set the time to zero, you can get caught out with summer time etc
  x = ((((x * 24)* 60) * 60) * 1000); // Turn days to miliseconds
  xDaysFromY.setTime( x + y.getTime() );
  return xDaysFromY;
}

</code>
</pre>
</p>
<p>
Hopefully someone else out there will find this handy :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelbox.net/2007/09/27/caculating-dates-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Really simple analytics</title>
		<link>http://www.pixelbox.net/2007/09/17/really-simple-analytics/</link>
		<comments>http://www.pixelbox.net/2007/09/17/really-simple-analytics/#comments</comments>
		<pubDate>Mon, 17 Sep 2007 22:09:38 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.pixelbox.net/2007/09/17/really-simple-analytics/</guid>
		<description><![CDATA[At work this morning I got one of those, &#8220;can you just&#8221;. But it wasn&#8217;t asking for me to knock up copy of YouTube or MySpace by the end of the week as a favour, but rather for a simple way or reccording the number of people that interact with and click on an advert [...]]]></description>
			<content:encoded><![CDATA[<p>
At work this morning I got one of those, &#8220;can you just&#8221;. But it wasn&#8217;t asking for me to knock up copy of YouTube or MySpace by the end of the week as a favour, but rather for a simple way or reccording the number of people that interact with and click on an advert <a href="http://www.bigkidlondon.com" title="BigKid Agency">BigKid</a> are doing for <a href="http://www.monkeymag.co.uk" title="The best of the web every week">Monkey Magazine</a>.
</p>
<p>
Now, Ceros records a number of statistics, all in line with industry standards and auditable by ABCE, and this is strictly none of the above, but it&#8217;s an easy way to see how many people are interacting with something.
</p>
<p>
So what I did was create a simple PHP page which will write the current date to a text file, each on a new line. The script will also display the number of lines in that file (if no variables are sent).
</p>
<p>
I though it was such a nice little, simple, but utterly useful script that I would put it up here. I then also added it to the flickr widget in I made in ActionScript3 to record the number of times people click on the photos to change them&#8230; which was a totally depressing experience as it turns out no one does ;(
</p>
<p>
So <a href='http://www.pixelbox.net/wp-content/uploads/2007/09/super_simple_php_stats.zip' title='PHP_stats'>here</a> is the PHP script which needs to be alongside a text file referenced inside it&#8230;
</p>
<p>
and <a href='http://www.pixelbox.net/wp-content/uploads/2007/09/randomphoto21.zip' title='RandomPhoto2.1'>here</a> is the Flex stuff with it added in (includes AS3 URLRequest example)&#8230;
</p>
<p>
and finally if you want to see how many people have clicked on that little widget to the right you can look <a href="http://www.pixelbox.net/stats/click.php">here</a>! (p.s. the first 15 were me!!!)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelbox.net/2007/09/17/really-simple-analytics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flickr widget part 2</title>
		<link>http://www.pixelbox.net/2007/09/14/flickr-widget-part-2/</link>
		<comments>http://www.pixelbox.net/2007/09/14/flickr-widget-part-2/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 09:14:28 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.pixelbox.net/2007/09/14/flickr-widget-part-2/</guid>
		<description><![CDATA[I had some more ideas about what to do with my flex flickr widget the other day. Inspired by Dunstan&#8217;s old blog that he never updates, I though I should get the widget to update related to my situation. For the first incarnation (and I have many more ideas of how to do this) it [...]]]></description>
			<content:encoded><![CDATA[<p>
I had some more ideas about what to do with my flex flickr widget the other day. Inspired by Dunstan&#8217;s old blog that he never updates, I though I should get the widget to update related to my situation.
</p>
<p>
For the first incarnation (and I have many more ideas of how to do this) it will update with the time of day to show a representation of where I am (London). It then selects a random photo in the top 20 results to show.
</p>
<p>
Clicking the image now updates the photo from the original result set, rather than making a new request, which has made it a million times faster.
</p>
<p>
The only problem is the difficulty I have searching and selecting images. I am currently using the tag search to bring back images of London plus Morning, landmarks, afternoon, evening or night. landmarks you say?? Well the thing is, no one seems to tag photos with day or noon, people only tag things that aren&#8217;t the norm.
</p>
<p>
So I am planning on adding some more photos of my own that I can use, or find out a clever way I can do some self tagging, perhaps with favourites or something.
</p>
<p>
The next step is going to have to be integration with another service, perhaps twitter, weather.com or in the future fireeagle.
</p>
<p>
<a href='http://www.pixelbox.net/wp-content/uploads/2007/09/randomphoto20.zip' title='RandomPhoto2'>Download the source code for my Flickr widget!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelbox.net/2007/09/14/flickr-widget-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Web service the REST way</title>
		<link>http://www.pixelbox.net/2007/08/15/flex-web-service-the-rest-way/</link>
		<comments>http://www.pixelbox.net/2007/08/15/flex-web-service-the-rest-way/#comments</comments>
		<pubDate>Wed, 15 Aug 2007 16:59:15 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.pixelbox.net/2007/08/15/flex-web-service-the-rest-way/</guid>
		<description><![CDATA[I have wanted to have a little project for a while now. Something to add to this blog that would help me learn something new and suffice my need to code. So I decided to create a really simple Flickr widget in Flex (frame work over kill I know). Previously in flex I have used [...]]]></description>
			<content:encoded><![CDATA[<p>
I have wanted to have a little project for a while now. Something to add to this blog that would help me learn something new and suffice my need to code. So I decided to create a really simple Flickr widget in Flex (frame work over kill I know).
</p>
<p>
Previously in flex I have used SOAP for communications, which is great, but it appears that Flickr provide SOAP services but no WSDL, great&#8230; what&#8217;s the point in that guys, you mares well just use REST! Well I guess that&#8217;s what they want you to do, so I decided to use their REST service.
</p>
<p>
This is as easy to do in AS3 as a SOAP web services, the only limitation is the Flickr API, annoyingly it&#8217;s not as easy to grab a random one of my photos as I initially hoped. So for the time being, it&#8217;s just a totally random Flickr photo.
</p>
<p>
So here is the code form my example REST web service in AS3 (Flex) which I expect would also work in AIR.
</p>
<p>
<a href='http://www.pixelbox.net/wp-content/uploads/2007/08/randomphoto.zip' title='RandomPhoto'>RandomPhoto Source Code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelbox.net/2007/08/15/flex-web-service-the-rest-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
