<?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>Daniel Eneström &#187; Flash</title>
	<atom:link href="http://blog.enestrom.com/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.enestrom.com</link>
	<description>Ramblings of a web developer</description>
	<lastBuildDate>Wed, 27 Jan 2010 19:49:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Create iPhone apps using Flash</title>
		<link>http://blog.enestrom.com/20091021/create-iphone-apps-using-flash/</link>
		<comments>http://blog.enestrom.com/20091021/create-iphone-apps-using-flash/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 04:43:24 +0000</pubDate>
		<dc:creator>Daniel Eneström</dc:creator>
				<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://blog.enestrom.com/?p=109</guid>
		<description><![CDATA[I&#8217;m so excited about the upcoming Flash Pro CS5. It will let you create native iPhone applications by exporting your ActionScript 3 movie from Flash. The app will, when it&#8217;s been exported, behave as any other app and can be uploaded to the AppStore etc.
Read more on Adobe Labs

]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m so excited about the upcoming Flash Pro CS5. It will let you create native iPhone applications by exporting your ActionScript 3 movie from Flash. The app will, when it&#8217;s been exported, behave as any other app and can be uploaded to the AppStore etc.<br />
<a href="http://labs.adobe.com/technologies/flashcs5/appsfor_iphone/">Read more on Adobe Labs</a></p>
<p><!-- Smart Youtube --><span class="youtube"><object width="496" height="305"><param name="movie" value="http://www.youtube.com/v/M7SK5ZKAaio&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="http://www.youtube.com/v/M7SK5ZKAaio&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" type="application/x-shockwave-flash" allowfullscreen="true" width="496" height="305" ></embed><param name="wmode" value="transparent" /></object></span><a href="http://www.youtube.com/watch?v=M7SK5ZKAaio"><img src="http://img.youtube.com/vi/M7SK5ZKAaio/default.jpg" width="130" height="97" border=0></a></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.enestrom.com%2F20091021%2Fcreate-iphone-apps-using-flash%2F&amp;linkname=Create%20iPhone%20apps%20using%20Flash"><img src="http://blog.enestrom.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.enestrom.com/20091021/create-iphone-apps-using-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Maps Flash API is sooo fun</title>
		<link>http://blog.enestrom.com/20091011/google-maps-flash-api-is-sooo-fun/</link>
		<comments>http://blog.enestrom.com/20091011/google-maps-flash-api-is-sooo-fun/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 19:32:57 +0000</pubDate>
		<dc:creator>Daniel Eneström</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://blog.enestrom.com/20091011/google-maps-flash-api-is-sooo-fun/</guid>
		<description><![CDATA[I&#8217;m implementing some Google Maps magic into a RIA for a client. Together with an auto-location thing using IP numbers the results are indeed stunning. I love Google&#8217;s API&#8217;s!
Google Maps API for Flash Developer Guide
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m implementing some Google Maps magic into a RIA for a client. Together with an auto-location thing using IP numbers the results are indeed stunning. I love Google&#8217;s API&#8217;s!</p>
<p><a href="http://code.google.com/intl/sv-SE/apis/maps/documentation/flash/intro.html">Google Maps API for Flash Developer Guide</a></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.enestrom.com%2F20091011%2Fgoogle-maps-flash-api-is-sooo-fun%2F&amp;linkname=Google%20Maps%20Flash%20API%20is%20sooo%20fun"><img src="http://blog.enestrom.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.enestrom.com/20091011/google-maps-flash-api-is-sooo-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Analytics and Flex using ExternalInterface</title>
		<link>http://blog.enestrom.com/20081114/google-analytics-and-flex-using-externalinterface/</link>
		<comments>http://blog.enestrom.com/20081114/google-analytics-and-flex-using-externalinterface/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 10:17:09 +0000</pubDate>
		<dc:creator>Daniel Eneström</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[ExternalInterface]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Google Analytics]]></category>

		<guid isPermaLink="false">http://blog.enestrom.com/?p=64</guid>
		<description><![CDATA[A big issue for people creating flash sites is getting the site to work well with Google Analytics. &#8220;The page doesn&#8217;t refresh. How can I track the clicks?&#8221;
Well, it is actually very easy. If you look at the trace script Google Analytics gives you to add to your HTML code you can find a call [...]]]></description>
			<content:encoded><![CDATA[<p>A big issue for people creating flash sites is getting the site to work well with Google Analytics. &#8220;The page doesn&#8217;t refresh. How can I track the clicks?&#8221;</p>
<p>Well, it is actually very easy. If you look at the trace script Google Analytics gives you to add to your HTML code you can find a call to a method that actually records the event. This method is simple to call using JavaScript.</p>
<p>I have solved it like this in my latest Flex App (which is a public site). NOTE: This is for the new trace code version.</p>
<p><strong>1. Paste the Google Analytics trace code as usual just before the &lt;/BODY&gt; tag.</strong><br />
Check your Google Analytics account for the correct code.</p>
<p><strong>2. See to it that your embedded flash works with ExternalInterface.</strong><br />
This can be a bit tricky, but in my experience the things that do the trick are to change <em>allowScriptAccess</em> to <em>always</em> and inside the Flex App call a custom JavaScript function on <em>creationComplete</em> like so: <em>ExternalInterface.call(&#8217;initFlash&#8217;)</em>. In my html this initFlash function creates a variable reference to the embedded flash. This sort of &#8220;creates the connection&#8221; between them. I&#8217;m not sure why this is so, but for me it works, so I&#8217;m happy with that. If there is a need I would be glad to create a more thorough tutorial on the use of ExternalInterface. Just let me know.</p>
<p><strong>3. Create a custom JavaScript that passes the URL you want to register to the Google Analytics script.</strong><br />
This is not necessary, but I have found it easier to work with, as you don&#8217;t need to edit you call from inside of Flex if something changes in the Google code or such.</p>
<div class="geshi no javascript">
<div class="head">function trackURL(url)</div>
<ol>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; pageTracker._trackPageview<span class="br0">&#40;</span>url<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p><strong>4. Call your custom javascript from within Flex.</strong><br />
I created a static class for this. (I love static classes). I named it <em>Analytics.as</em> and placed it in the root source folder in the Flex App. It looks like this. All it does really is call the JavaScript using ExternalInterface, but putting it within a static class lets you call it from anywhere in your application without having to pass on references to this or that object or function.</p>
<div class="geshi no actionscript">
<div class="head">package</div>
<ol>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw3">public</span> <span class="kw2">class</span> Analytics</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="kw3">import</span> flash.<span class="me1">external</span>.<span class="me1">ExternalInterface</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw3">static</span> <span class="kw2">function</span> track<span class="br0">&#40;</span><span class="kw3">url</span>:<span class="kw3">String</span><span class="br0">&#41;</span> : <span class="kw3">void</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ExternalInterface.<span class="kw3">call</span><span class="br0">&#40;</span><span class="st0">&quot;trackURL&quot;</span>, <span class="kw3">url</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>And anywhere in your app write:</p>
<div class="geshi no actionscript">
<ol>
<li class="li1">
<div class="de1">Analytics.<span class="me1">track</span><span class="br0">&#40;</span><span class="st0">&#39;/path_to_tha_page_you_want_to_track/&#39;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>(NOTE: You have to start your path with a slash).</p>
<p><strong>There you go.</strong> It now should track the URL:s you want and give you nice statistics.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.enestrom.com%2F20081114%2Fgoogle-analytics-and-flex-using-externalinterface%2F&amp;linkname=Google%20Analytics%20and%20Flex%20using%20ExternalInterface"><img src="http://blog.enestrom.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.enestrom.com/20081114/google-analytics-and-flex-using-externalinterface/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>FlashTracer Firefox plugin</title>
		<link>http://blog.enestrom.com/20080703/flashtracer-firefox-plugin/</link>
		<comments>http://blog.enestrom.com/20080703/flashtracer-firefox-plugin/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 08:01:02 +0000</pubDate>
		<dc:creator>Daniel Eneström</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.enestrom.com/?p=6</guid>
		<description><![CDATA[Update Jan 24 -09: The Flash Tracer that works with Firefox 3 has to be downloaded from the creator&#8217;s own site. The one at Mozilla Addons doesn&#8217;t work with 3.x (yet). In the instructions below I have therefore used the link to his own site.
If you&#8217;re developing for Flash/Flex the FlashTracer can be quite a [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #808080;"><em>Update Jan 24 -09: </em><span style="color: #008000;">The Flash Tracer that works with Firefox 3 has to be downloaded from the creator&#8217;s own site. The one at Mozilla Addons doesn&#8217;t work with 3.x (yet). In the instructions below I have therefore used the link to his own site.</span></span></p>
<p>If you&#8217;re developing for Flash/Flex the FlashTracer can be quite a nifty plugin. It lets you see the flash player trace output directly in a sidebar in you browser. Outputting debugging info is something I use all the time while developing and I have tried several times to get FlashTracer to work, but haven&#8217;t managed, so I usually have a textarea inside my flash/flex project with a custom debug output. I guess I have been too impatient before but today I sat down and read through some posts about it. This is how I eventually got it to work on my Mac:</p>
<p>1. Make sure you&#8217;re using the latest Flash Player <strong>Debug</strong> version. <a title="Flash Player download" href="http://www.adobe.com/support/flashplayer/downloads.html" target="_blank">Download it here</a></p>
<p>2. Install the <a title="FlashTracer Firefox add-on" href="http://www.sephiroth.it/firefox/flashtracer/" target="_blank">plugin</a> (of course)</p>
<p>3. Open the FlashTracer sidebar in FireFox. Click the Preferences button.</p>
<p>4. Under the area named &#8220;Select output file&#8221; click browse and point the plugin to the flashlog.txt file your debug player outputs. In my case (being on a mac) it was here:<br />
<em>/Users/{username}/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt</em></p>
<p>The plugin will ask if you want to replace the file, which is stupid because you will want to read from the file, not write to it, but that&#8217;s just how it is. Don&#8217;t let it scare&#8217;ya.</p>
<p>5. Save/close preferences.</p>
<p>6. Restart FireFox.</p>
<p>That should do it.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.enestrom.com%2F20080703%2Fflashtracer-firefox-plugin%2F&amp;linkname=FlashTracer%20Firefox%20plugin"><img src="http://blog.enestrom.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.enestrom.com/20080703/flashtracer-firefox-plugin/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
