<?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>code zen &#187; Flash</title>
	<atom:link href="http://www.arpitonline.com/blog/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.arpitonline.com/blog</link>
	<description>"I write pretty software"</description>
	<lastBuildDate>Sun, 25 Jul 2010 22:23:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>My FlashCampPhilly presentation: Some interesting libraries to consider for your next app</title>
		<link>http://www.arpitonline.com/blog/2009/11/16/my-flashcampphilly-presentation-some-interesting-libraries-to-consider-for-your-next-app/</link>
		<comments>http://www.arpitonline.com/blog/2009/11/16/my-flashcampphilly-presentation-some-interesting-libraries-to-consider-for-your-next-app/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 20:27:06 +0000</pubDate>
		<dc:creator>arpit</dc:creator>
				<category><![CDATA[Air]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=384</guid>
		<description><![CDATA[Last Saturday, Philadelphia was host to its first ever FlashCamp event. The event brought together some of the biggest names in Flash and Flex in the neighborhood and beyond (special kudos to Rob Hall for organizing the event from vision to a lot of very hard work). I did have one session at the event [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 20px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2009%2F11%2F16%2Fmy-flashcampphilly-presentation-some-interesting-libraries-to-consider-for-your-next-app%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2009%2F11%2F16%2Fmy-flashcampphilly-presentation-some-interesting-libraries-to-consider-for-your-next-app%2F" height="61" width="51" /></a></div><p>Last Saturday, Philadelphia was host to its first ever <a href="flashcamp.pfpaug.org/">FlashCamp event</a>. The event brought together some of the biggest names in Flash and Flex in the neighborhood and beyond (special kudos to <a href="http://www.impossibilities.com/v4/">Rob Hall</a> for organizing the event from vision to a lot of very hard work). I did have one session at the event as well, as I walked through some of the libraries I have started using in a lot of my projects, including the soon to be alpha-ed <a href="http://www.espressoreader.com">Espresso Reader</a>. These libraries included:</p>
<ul>
<li>The <a href="http://github.com/arpit/logbook">CIM logging framework including LogBook</a></li>
<li>Drew Cummins&#8217; <a href="http://blog.generalrelativity.org/actionscript-30/green-threads/">Green Threading library</a></li>
<li>Performance measurement libraries like <a href="http://www.gskinner.com/blog/archives/2009/04/as3_performance.html">gskinner&#8217;s performance testing harness</a>
<li>Some <a href="http://github.com/arpit/openpyro-airhelpers">miscellaneous classes</a> that I have written for AIR apps</li>
</li>
<p>Anyway, the entire presentation is embedded below for posterity. My favorite lib is the green threading one which is saving me a lot of headaches in terms of keeping my application performant even while doing a lot of data processing. I&#8217;ll probably have a separate post up soon with a good example on that.</p>
<div style="width:425px;text-align:left" id="__ss_2512655"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/arpitmathur/flashcamp" title="Flashcamp">Flashcamp</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=flashcamp-091116134646-phpapp02&#038;stripped_title=flashcamp" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=flashcamp-091116134646-phpapp02&#038;stripped_title=flashcamp" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/arpitmathur">arpitmathur</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.arpitonline.com/blog/2009/11/16/my-flashcampphilly-presentation-some-interesting-libraries-to-consider-for-your-next-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on Commercial Ecosystem for the Flash Platform</title>
		<link>http://www.arpitonline.com/blog/2009/09/29/thoughts-on-commercial-ecosystem-for-the-flash-platform/</link>
		<comments>http://www.arpitonline.com/blog/2009/09/29/thoughts-on-commercial-ecosystem-for-the-flash-platform/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 02:02:54 +0000</pubDate>
		<dc:creator>arpit</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=356</guid>
		<description><![CDATA[This post is in response to Grant Skinners post on a thriving commercial ecosystem for the Flash Platform. For those who are just getting caught up with the conversation, it all began with Adobe labs releasing Squiggly, a spelling library for Flash apps which may compete directly with Grant&#8217;s own Spelling Plus Library which prompted [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 20px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2009%2F09%2F29%2Fthoughts-on-commercial-ecosystem-for-the-flash-platform%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2009%2F09%2F29%2Fthoughts-on-commercial-ecosystem-for-the-flash-platform%2F" height="61" width="51" /></a></div><p>This post is in response to Grant Skinners post on <a href="http://www.gskinner.com/blog/archives/2009/09/how_can_adobe_e.html">a thriving commercial ecosystem for the Flash Platform</a>. For those who are just getting caught up with the conversation, it all began with Adobe labs releasing <a href="http://labs.adobe.com/technologies/squiggly/">Squiggly</a>, a spelling library for Flash apps which may compete directly with Grant&#8217;s own <a href="http://gskinner.com/products/spl/about.php">Spelling Plus Library</a> which prompted quite a few people (including <a href="http://www.gskinner.com/blog/archives/2009/09/some_thoughts_o.html">Grant himself</a>) to talk about how Adobe may be competing with developers who build on their platform.  This conversation isn&#8217;t new, quite a few people said the same thing when Adobe came out with <a href="https://www.photoshop.com/">Photoshop.com</a> which competed with services like <a href="http://www.picnik.com/">Picnik</a>. As Adobe starts eying the services market with apps like Share, Buzzword, etc, developers may (justifiably) feel that it may be a matter of time before Adobe competes with them should their product seem lucrative. Considering they own the platform, ie the Flash Player, they may very well put features in that give them the advantage. For example,<a href="http://www.adobe.com/products/acrobatconnectpro/"> Adobe Connect</a> already leverages the screen sharing capability that gets enabled on the Flash Player with the Connect plugin (yes a plugin for the browser plugin), something that non-adobe developers cannot access.</p>
<p>Can Adobe navigate these waters carefully enough to not alienate its developers remains to be seen, but this post is more regarding Grant&#8217;s follow up post on what Adobe can do to create a vibrant commercial ecosystem for the Flash Platform.</p>
<p>Actually there is a slight difference in the title of Grant&#8217;s post: &#8220;How Can Adobe Encourage a Commercial Ecosystem?&#8221; and what he writes about: &#8220;&#8230; lack the high-quality, well-supported, production-ready components that a commercial marketplace can provide.&#8221; While both are in similar vein, I feel a thriving commercial ecosystem on the Flash Platform doesnt have to be based around production ready components. There will be a few, like SPL that make a decent amount of money but those are going to be the exception and not the rule.</p>
<p>Adam Lehman, ColdFusion Product Manager made the point on one of the comments on that post which I most agree with: The Free Open Source marketplace which is pretty thriving on the Flash Platform does tend to kill the commercial component marketplace. </p>
<p>A Commercial Ecosystem on the Flash Platform is different from a commercial ecosystem on the Flash Platform based around commercial components. Grant&#8217;s own SPL is only viable till an open source version came out that may even be half as good as the SPL. The Flash developer community has become used to the Open Source way: find something out there that fills your need, if not and you find a fledgeling open source project that may have those ambitions, see if you can contribute, else build it yourself. My personal opinion is that the market for commercial components is pretty small no matter what Adobe does, and I dont think too many people miss it (except maybe a few folk coming from the Microsoft side of the world who are used to paying for components they use).</p>
<p>Flash Platform&#8217;s own commercial ecosystem would/should probably be around full products, embeddable widgets, AIR applications, Flash lite/mobile AIR apps etc. The best thing Adobe could do is keep powering the platform even more, add more capabilities to the runtimes, create distribution and monetization channels for the developers and make sure the developers dont feel threatened. And the <a href="http://www.adobe.com/devnet/flashplatform/services/">developer services products</a> on Adobe devnet seems to be a step in the right direction.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arpitonline.com/blog/2009/09/29/thoughts-on-commercial-ecosystem-for-the-flash-platform/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>When things go wrong: Communicating error and gathering information for client side code</title>
		<link>http://www.arpitonline.com/blog/2009/07/09/when-things-go-wrong-communicating-error-and-gathering-information-for-client-side-code/</link>
		<comments>http://www.arpitonline.com/blog/2009/07/09/when-things-go-wrong-communicating-error-and-gathering-information-for-client-side-code/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 00:24:43 +0000</pubDate>
		<dc:creator>arpit</dc:creator>
				<category><![CDATA[Air]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=257</guid>
		<description><![CDATA[Having developed client side applications for the last few years in a variety of languages (Java, Flash, AIR, Javascript and recent forays into Objective C for the IPhone), its funny that some discussions appear cyclically and are discussed as though for the first time in every new project. Communicating errors in your application seems to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 20px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2009%2F07%2F09%2Fwhen-things-go-wrong-communicating-error-and-gathering-information-for-client-side-code%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2009%2F07%2F09%2Fwhen-things-go-wrong-communicating-error-and-gathering-information-for-client-side-code%2F" height="61" width="51" /></a></div><p>Having developed client side applications for the last few years in a variety of languages (Java, Flash, AIR, Javascript and recent forays into Objective C for the IPhone), its funny that some discussions appear cyclically and are discussed as though for the first time in every new project. Communicating errors in your application seems to be one of them, and I wanted to pen a few thoughts on that.</p>
<p><strong>Serverside developers have it easy!</strong><br />
Well, no <img src='http://www.arpitonline.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . But there are paradigms that have become the norm now. If something bad happens and you get a 404 or a 500 error on a webpage, its pretty likely that its been logged and if its on a major product, alarms have been raised. Client side code, especially in the languages I have worked in the last couple of years, have been less&#8230;communicative. I would like to focus on AIR and Flash here since those are the technologies I work with most often. The problem becomes more critical in AIR where you have much more things that can go wrong since you are interacting with items on the user&#8217;s machine which is not a controlled environment.</p>
<p><strong>Why communicate the error?</strong><br />
Very few client side web apps I have worked with, including my own, have ever seemed to have handled error correctly. Most of the time, the app has been scoped with time allocated against the features and error states have never been considered. Occasionally, a developer will put in an Alert window or something similar just as a precaution (I know I have). In Flash/AIR there doesnt seem to be a good library that I can integrate into my application that encapsulates best practicess. Heck, I dont even know what the best practices are, which is what prompted me to write this post.</p>
<p>What would you include in the error window?<br />
While you may want to include app specific information in the error window, I think there are a few things that make most sense:</p>
<ul>
<li>An error description: What happened ? Corrupt file? Cannot connect to server? Something readable. For bonus points, can the user do anything about this, like restart the application?</li>
<li>An error code: This makes sense and if you include a support system, like a bug tracker or a 1-800 number, it would make the conversation a lot more meaningful</li>
<li>The detailed stack trace: A good paradigm I have seen here is a toggleable details state that shows/hides the detailed error stack trace, would go a long way in figuring out the source of the error</li>
<li>Extra points: email API integration, or some other way for the user to send the error description with as little pain as possible</li>
</ul>
<p>The last point is kind of interesting, cause you might want to send more than just the stack trace of the error. You might want to set the whole application state. If you have application logging enabled, say with something like the <a href="http://code.google.com/p/cimlogbook/"> CIM logging framework</a>, the whole log file might be of interest. Again, the developer must ensure that he is only logging non-personal information there. </p>
<p>Of course there are situations when the error might cause the entire app to blow up, without giving it enough time to react to the error. Would it make sense to log and end of session event and allow users to send the application log to the server if the end of session was not successfully logged for a prior session? </p>
<p><strong>Prior Art:</strong></p>
<p>I started looking at some Google results for Error dialogs and crash reporters. Here are some screenshots:</p>
<p>First is the JXErrorPane, a Java class part of <a href="https://swingx.dev.java.net/">SwingX</a> project. This seems to be the most familiar UI for reporting errors(<a href="http://swinglabs.org/hudson/job/SwingX%20Weekly%20Build/javadoc/org/jdesktop/swingx/JXErrorPane.html">link to API docs</a>)</p>
<p><a href="http://www.flickr.com/photos/18974628@N00/3699653393/" title="jxerrorpane by arpit_m, on Flickr"><img src="http://farm3.static.flickr.com/2615/3699653393_c65bee388e.jpg" width="500" height="318" alt="jxerrorpane" /></a></p>
<p>The usage is pretty simple:</p>
<p><code></p>
<p> try {<br />
          //do stuff.... something throws an exception in here<br />
      } catch (Exception e) {<br />
          JXErrorPane.showDialog(e);<br />
      }</p>
<p></code></p>
<p>A step up would be the UI from <a href="http://en.wikipedia.org/wiki/Crash_reporter">crash reporters</a> which would perhaps be overkill for a web app, but would make a lot of sense for desktop apps, especially in the beta stages. Here is a screenshot from something called Bug Buddy.</p>
<p><img src="http://upload.wikimedia.org/wikipedia/en/b/b0/Screenshot-Bug_Buddy.png" alt="Bug Buddy" /></p>
<p>Whats kind of interesting here is that it adds a field that allows user to add information about the context of the crash, as well as an email address that may be used to contact him or something.</p>
<p>The last screenshot is from an open source library called <a href="http://github.com/rentzsch/jrfeedbackprovider/tree/master">JRFeedbackProvider </a>someone presented at the Philadelphia Cocoa Users Group. </p>
<p><a href="http://www.flickr.com/photos/18974628@N00/3700539514/" title="JRFeedbackProvider by arpit_m, on Flickr"><img src="http://farm3.static.flickr.com/2619/3700539514_c3f9352ea9.jpg" width="500" height="433" alt="JRFeedbackProvider" /></a>. This has the features of the previous crash reporters but also adds a &#8220;request a feature&#8221; tab which is great if you are running an alpha version of your application and are looking for more than bug reports.</p>
<p>If you have seen any other error UI that seem to do a good job, please add a comment here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arpitonline.com/blog/2009/07/09/when-things-go-wrong-communicating-error-and-gathering-information-for-client-side-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Adobe toys this week: Flash Builder 4, Flex 4 SDK, Flash Catalyst, BrowserLab</title>
		<link>http://www.arpitonline.com/blog/2009/06/03/new-adobe-toys-this-week-flash-builder-4-flex-4-sdk-flash-catalyst-browserlab/</link>
		<comments>http://www.arpitonline.com/blog/2009/06/03/new-adobe-toys-this-week-flash-builder-4-flex-4-sdk-flash-catalyst-browserlab/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 04:27:02 +0000</pubDate>
		<dc:creator>arpit</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=233</guid>
		<description><![CDATA[An exciting week for Flash Platform Developers as Adobe released a number of Beta versions on the Adobe Labs site. I have just started playing with a couple of them but its definitely worth the shout out. 
Flash Builder 4:
Flash Builder 4 is the next version of the Eclipse based IDE formerly known as Flex [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 20px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2009%2F06%2F03%2Fnew-adobe-toys-this-week-flash-builder-4-flex-4-sdk-flash-catalyst-browserlab%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2009%2F06%2F03%2Fnew-adobe-toys-this-week-flash-builder-4-flex-4-sdk-flash-catalyst-browserlab%2F" height="61" width="51" /></a></div><p>An exciting week for Flash Platform Developers as Adobe released a number of Beta versions on the <a href="http://labs.adobe.com">Adobe Labs</a> site. I have just started playing with a couple of them but its definitely worth the shout out. </p>
<p><strong>Flash Builder 4:</strong><br />
<a href="http://labs.adobe.com/technologies/flashbuilder4/">Flash Builder 4</a> is the next version of the Eclipse based IDE formerly known as Flex Builder. The renaming is more than just a re-branding exercise, as FB4 seems to have added features that make it a lot easier to work with other frameworks besides Flex.  This is really exciting for me personally as this means it will be a lot easier to work with <a href="http://openpyro.org">OpenPyro</a> in FB4. In fact Greg even created a <a href="http://www.gypsytrader.com/MXML_AS3/MXML_AS3.html">simple project</a> with AS3 only classes that could be exposed as MXML tags. The resultant file size is minute. </p>
<p>Besides that, the my favorite extension to the IDE has been the inclusion of <a href="http://opensource.adobe.com/wiki/display/flexunit/FlexUnit">FlexUnit</a>, the unit testing framework for Flex. While FlexUnit itself has been available as a library for a while, inclusion into the IDE will make unit testing a lot easier and hopefully a lot more prevalent. </p>
<p>There is also a network monitor built right into the IDE. While I have used Firebug with success for Flash apps on the web, doing the same for AIR apps has been a challenge (though <a href="http://www.charlesproxy.com/">Charles</a> has been really good, though a requires a bit of a context-switch when coding). The network monitor is going to make a lot of lives a lot easier.</p>
<p>Integration of ASDocs is another great feature, as well as code generation for integrating with serverside code.</p>
<p>[Update] There are also a bunch of improvements to the Debugger on FB4 which you can read more about <a href="http://www.morearty.com/blog/2008/11/18/new-flex-builder-debugger-features-conditional-breakpoints-function-calls-from-expressions-watchpoints-and-more/">here</a>.</p>
<p><strong>Flash Catalyst:</strong><br />
<a href="http://labs.adobe.com/technologies/flashcatalyst/">Flash Catalyst</a> is a new tool that Adobe is releasing with the promise of truthfully translating designer interactions to stub code that a developer can add functionality to. Basically Catalyst can import any Photoshop, Fireworks or Illustration file, and then can allow the design to assign behaviors to the different parts. For example the designer can select four graphics and mark tham as the four parts of a Scrollbar. The interactions are written out as Flex4 tags that can be compiled into a swf with complete interactivity.</p>
<p>The video below shows how Catalyst can be used:</p>
<p><embed src="http://tv.adobe.com/Embed.swf" quality="high" bgcolor="#000000" width="467" height="300" name="AdobeTVPlayer" play="true" loop="false" quality="high" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" flashVars="v=~b64~aHR0cDovL2Fkb2JlLmVkZ2Vib3NzLm5ldC9mbGFzaC9hZG9iZS9hZG9iZXR2Mi90ZWNoX3RhbGtfd2l0aF9yeWFuX3N0ZXdhcnQvMTAyX3R0cl8wMDkuZmx2P3Jzc19mZWVkaWQ9MTU3OSZ4bWx2ZXJzPTI=&#038;w=467&#038;t=http://tv.adobe.com/vi+f1579v1003&#038;h=300"></embed></p>
<p>Flex 4:<br />
The two releases of course directly depend on the <a href="http://labs.adobe.com/technologies/flex4sdk/">Flex 4 SDK</a>, Adobe&#8217;s Open Source framework for building Rich Internet Applications. The new release of the SDK introduces a new component architecture called Spark. The core difference between the Spark and the earlier Halo architecture is the favor of the <a href="http://en.wikipedia.org/wiki/Object_composition">composition</a> as a design pattern over inheritance. What this translates into in everyday development is a leap in productivity as complex UI components can be created a lot easier than before and not requiring things to be subclassed as often. This also makes skinning a lot easier, since all the skin parts can be swapped pretty easily. Another new thing in Flex 4 is the introduction of a <a href="http://opensource.adobe.com/wiki/display/flexsdk/FXG+1.0+Specification">new graphics interchange format called FXG</a>, an xml format for graphics that can be understood even by the CS4 products like Photoshop and Fireworks. <a href="http://www.adobe.com/devnet/flex/articles/flex4sdk_whatsnew.html">Matt Chotin&#8217;s post</a> on changes in Flex is a lot more comprehensive.</p>
<p><strong>BrowserLab</strong><br />
<a href="https://browserlab.adobe.com/index.html">BrowserLab</a>, a project formerly known as Meer Meer, is a new service being released by Adobe that targets HTML developers. BrowserLab allows developers to preview any URL as rendered by different browsers. The service is in limited beta, but I was able to get an account before it was capped, and I can tell you its pretty impressive. It would be interesting to see how Adobe can integrate this with Dreamweaver, although its supposed to remain open to mortals like myself who still prefer TextMate <img src='http://www.arpitonline.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>So a lot of toys on the labs site. Take em out for a spin and let me know what you think <img src='http://www.arpitonline.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.arpitonline.com/blog/2009/06/03/new-adobe-toys-this-week-flash-builder-4-flex-4-sdk-flash-catalyst-browserlab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 weirdness with URLVariables for HTTP POST</title>
		<link>http://www.arpitonline.com/blog/2008/08/04/as3-weirdness-with-urlvariables-for-http-post/</link>
		<comments>http://www.arpitonline.com/blog/2008/08/04/as3-weirdness-with-urlvariables-for-http-post/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 03:02:46 +0000</pubDate>
		<dc:creator>arpit</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=143</guid>
		<description><![CDATA[Two+ hours wasted today on dealing with this. Apparently when using URLVariables to pass variables to the server using HTTP Post, using the square bracket syntax ( vars[varname] = varvalue ) sets the contentType of the URLRequest to text/html. However setting the same variables using the dot syntax (vars.varname = varvalue) sets it to text/xml. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 20px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2008%2F08%2F04%2Fas3-weirdness-with-urlvariables-for-http-post%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2008%2F08%2F04%2Fas3-weirdness-with-urlvariables-for-http-post%2F" height="61" width="51" /></a></div><p>Two+ hours wasted today on dealing with this. Apparently when using URLVariables to pass variables to the server using HTTP Post, using the square bracket syntax ( vars[varname] = varvalue ) sets the contentType of the URLRequest to text/html. However setting the same variables using the dot syntax (vars.varname = varvalue) sets it to text/xml. I couldn&#8217;t set the contentType to text/xml using the [] notation no matter how I tried, whether using the URLRequest.contentType property or appending a custom &#8220;Content-Type&#8221;,&#8221;text/xml&#8221; <a href="http://livedocs.adobe.com/flex/3/langref/flash/net/URLRequestHeader.html">URLRequestHeader</a>. </p>
<p>Hope this helps someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arpitonline.com/blog/2008/08/04/as3-weirdness-with-urlvariables-for-http-post/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>LogBook and Application Performance</title>
		<link>http://www.arpitonline.com/blog/2008/05/29/logbook-and-application-performance/</link>
		<comments>http://www.arpitonline.com/blog/2008/05/29/logbook-and-application-performance/#comments</comments>
		<pubDate>Fri, 30 May 2008 03:14:48 +0000</pubDate>
		<dc:creator>arpit</dc:creator>
				<category><![CDATA[Air]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Papervision]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[serverside]]></category>
		<category><![CDATA[LogBook]]></category>

		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=136</guid>
		<description><![CDATA[Its exciting to see LogBook, Comcast Interactive Media&#8217;s first open source project get some traction. There is talk of LogBook being included in other open source projects as well as people have started submitting patches and suggestions to the project. 
One issue that was submitted a few days back was around the Logging implementation dispatching [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 20px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2008%2F05%2F29%2Flogbook-and-application-performance%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2008%2F05%2F29%2Flogbook-and-application-performance%2F" height="61" width="51" /></a></div><p>Its exciting to see <a href="http://code.google.com/p/cimlogbook/">LogBook</a>, Comcast Interactive Media&#8217;s first open source project get some traction. There is talk of LogBook being included in other open source projects as well as people have started submitting patches and suggestions to the project. </p>
<p>One issue that was submitted a few days back was around the Logging implementation dispatching all logging events out of the application across the LocalConnection. Here is a quote from the issue:</p>
<blockquote><p>Logging could add significant overhead to an application, due to<br />
log message construction, and sending messages to LogBook.</p>
<p>It is good practice to minimize logging overhead, with code like:</p>
<p>	if (Log.isInfo()) {<br />
		LOG.info(&#8221;version: {0}&#8221;, version);<br />
	}</p>
<p>The current implementation of class LocalConnectionTarget always<br />
sets the log level to ALL and the log filter to &#8220;*&#8221;. This means<br />
that all logging methods are executed, which is undesirable.</p></blockquote>
<p>You can see the details of the issue <a href="http://code.google.com/p/cimlogbook/issues/detail?id=17">here</a>.</p>
<p>I just wanted to elaborate a little on why the LocalConnectionTarget class does not use any kind of filtering to reduce the number of LogMessages being constructed.</p>
<p>One of the reason we went with LogBook as an AIR application as opposed to a web application was because as far as I know, the Flash Player process on the web is independent from that in AIR. This means that LogBook could become a very elaborate application on its own but it will not impact the performance of the application using LogBook based logging. Also when we pass objects across LocalConnection, these objects do not accumulate in the application&#8217;s memory. Here is a screenshot from a quick experiment where I ran an endless loop that created a custom LogDispatcher object, had it send a log message across the LocalConnection and then get garbage collected. The memory profile of the application can be seen below:</p>
<p><img src="http://farm4.static.flickr.com/3086/2534823945_0628f5a1fd.jpg" alt="LogBook App Memory Profile" /></p>
<p>Here is also the live objects screen capture:</p>
<p><img src="http://farm4.static.flickr.com/3004/2534823971_49a331fa21_o.jpg" alt="LogBook Enabled App Live Objects Screen Grab" /></p>
<p>As you can see, over 600 objects were constructed but all of them could be garbage collected with no overhead in terms of memory used. </p>
<p>So your take away from this discussion is: using LogBook has virtually no memory overhead in your application. The idea of broadcasting all messages to LogBook is to allow you to filter the data on the client at the moment of debugging or after, rather than configuring it at some pre-launch time.</p>
<p>Now LogBook itself is another story. Another bug submitted by the same developer who reported this also talked about <a href="http://code.google.com/p/cimlogbook/issues/detail?id=14">LogBook&#8217;s performance when over 1000 messages</a> were collected, and yes, I have verified that at that point, the application becomes pretty sluggish. So for the next version of the LogBook, I am considering leveraging the SQLite database that AIR comes packaged with. </p>
<p>More on LogBook 2.0 soon. We are already on it and it will be good <img src='http://www.arpitonline.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . If you would like to participate in defining the functionality in 2.0 or better yet, help us develop it, join the conversation on the <a href="http://groups.google.com/group/cimlogbook">LogBook user group here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arpitonline.com/blog/2008/05/29/logbook-and-application-performance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Can PicLens be done in just Flash and Papervision3d ? Here ya go !</title>
		<link>http://www.arpitonline.com/blog/2008/03/12/can-piclens-be-done-in-just-flash-and-papervision3d-here-ya-go/</link>
		<comments>http://www.arpitonline.com/blog/2008/03/12/can-piclens-be-done-in-just-flash-and-papervision3d-here-ya-go/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 00:22:07 +0000</pubDate>
		<dc:creator>arpit</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=120</guid>
		<description><![CDATA[PicLens has been one of the new interfaces that has wowed quite a bit of people I know (including myself). But the application is written in native code and needs to be installed on your computer as a plugin to be usable. Off late I have been playing with Papervision3D a bit and I figured [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 20px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2008%2F03%2F12%2Fcan-piclens-be-done-in-just-flash-and-papervision3d-here-ya-go%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2008%2F03%2F12%2Fcan-piclens-be-done-in-just-flash-and-papervision3d-here-ya-go%2F" height="61" width="51" /></a></div><p><a href="https://addons.mozilla.org/en-US/firefox/addon/5579">PicLens</a> has been one of the new interfaces that has wowed quite a bit of people I know (including myself). But the application is written in native code and needs to be installed on your computer as a plugin to be usable. Off late I have been playing with Papervision3D a bit and I figured it was possible to kind of get the functionality just by using that. Here is the result of my experiments so far. (warning: this demo requires a good internet connection since I am loading a lot of images)</p>
<p>Update: Uploaded a video for users on poorer connections:</p>
<div style="float:left;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="623" height="560" id="plaer" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="wmode" value="transparent" /><param name="movie" value="/blog/swf/piclens/plaer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="/blog/swf/piclens/plaer.swf" quality="high" bgcolor="#ffffff" width="623" height="560" name="plaer" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /><br />
	</object></div>
<p>Click on the input text field, enter a search term and hit enter:</p>
<div style="float:left;"><object width="600" height="500"><param name="movie" value="/blog/swf/piclens/Photowall.swf "></param><param name="bgcolor" value="#111111"></param><param name="wmode" value="opaque"></param><embed src="/blog/swf/piclens/Photowall.swf " type="application/x-shockwave-flash" wmode="opaque" width="600" height="500" bgcolor="#111111"></embed></object></div>
<div style="clear:both;"></div>
<p>The code is built on top of the Paged &#8211; data classes I had talked about in my last post. So basically new photos are loaded from Flickr as you reach the edge of the currently loaded data set. The code is pretty awful right now since I had to revisit my basic algorithm a couple of times so if you scroll around quite a bit, it may begin to spike your memory or act all weird. I need to implement some recycling of renderers strategy which seems to be advised strongly for such applications. Also I am not completely happy with the tilting algorithm I have right now (to get it really right I need to change the algorithm to do a little more math, right now the transition from tilt to normal is a little jarring). Ah well, that happens later. Right now, I am just stoked this works <img src='http://www.arpitonline.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . </p>
]]></content:encoded>
			<wfw:commentRss>http://www.arpitonline.com/blog/2008/03/12/can-piclens-be-done-in-just-flash-and-papervision3d-here-ya-go/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Photowall: Scroll based data prefetch</title>
		<link>http://www.arpitonline.com/blog/2008/03/11/photowall-scroll-based-data-prefetch/</link>
		<comments>http://www.arpitonline.com/blog/2008/03/11/photowall-scroll-based-data-prefetch/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 03:53:53 +0000</pubDate>
		<dc:creator>arpit</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=119</guid>
		<description><![CDATA[Photowall is part 1 of a secret project I am working on (secret only since I am not sure part 2 will work, so I&#8217;d rather not declare yet what its about   ). This component on its own is an exercise in data-prefetch. The idea is to load data as the user scrolls [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 20px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2008%2F03%2F11%2Fphotowall-scroll-based-data-prefetch%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2008%2F03%2F11%2Fphotowall-scroll-based-data-prefetch%2F" height="61" width="51" /></a></div><p>Photowall is part 1 of a secret project I am working on (secret only since I am not sure part 2 will work, so I&#8217;d rather not declare yet what its about <img src='http://www.arpitonline.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ). This component on its own is an exercise in data-prefetch. The idea is to load data as the user scrolls to the end of the current set rather than ask the user to click on a &#8220;more photos&#8221; link. In this case, the component is feeding off Flickr data. </p>
<p>Type in a search word inside the text input and hit enter. Once the first set of data has loaded in, use the scrubber below the photos to scrub through the photos. Note: Data prefetch is triggered on mouse-up rather than mouse-move, I need to implement that in the final version.</p>
<p><object width="600" height="400"><param name="movie" value="/blog/swf/Photowall.swf "></param><param name="wmode" value="opaque"></param><embed src="/blog/swf/Photowall.swf " type="application/x-shockwave-flash" wmode="opaque" width="600" height="400"></embed></object></p>
<p>Under the hood, I have a class called PagedDataService that computes which page of the remote data the user is on (Flickr apis support paged data, with each call out asking for a certain number of photos and a page offset, so page 1 has 0 to 1 x pagesize photos, page has 2 x pagesize, etc. Right now my pagesize is 60. ). The code also uses a PagePolicy class that the container looks at to see when the more data should be fetched. For example, in this case, I have asked the container to get more photos when the user is about 18 photos (6 columns) away from the last photo in the set.</p>
<p>There is no optimization of the code here yet, so I am not managing the photo renderers that aren&#8217;t visible to the user (which would free up memory). Another optimization would be to reuse renderers rather than create new ones like I do for every photo. Finally, a priority queue for the load requests would be great here.</p>
<p>So much for part 1, on to part 2. Stay tuned <img src='http://www.arpitonline.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arpitonline.com/blog/2008/03/11/photowall-scroll-based-data-prefetch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>E4X parsing caveat: Watchout for the Firefox-hidden Namespaces</title>
		<link>http://www.arpitonline.com/blog/2008/02/05/e4x-parsing-caveat-watchout-for-the-firefox-hidden-namespaces/</link>
		<comments>http://www.arpitonline.com/blog/2008/02/05/e4x-parsing-caveat-watchout-for-the-firefox-hidden-namespaces/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 02:01:46 +0000</pubDate>
		<dc:creator>arpit</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=110</guid>
		<description><![CDATA[A friend of mine was having issues with parsing an xml file using E4X today. We were trying parsing an XML file generated by a webservice and for all he tried, the nodes were completely inaccessible to his code. Viewing the XML in Firefox didn't give any clues and everything should have worked. I have [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 20px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2008%2F02%2F05%2Fe4x-parsing-caveat-watchout-for-the-firefox-hidden-namespaces%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2008%2F02%2F05%2Fe4x-parsing-caveat-watchout-for-the-firefox-hidden-namespaces%2F" height="61" width="51" /></a></div><p>A friend of mine was having issues with parsing an xml file using E4X today. We were trying parsing an XML file generated by a webservice and for all he tried, the nodes were completely inaccessible to his code. Viewing the XML in Firefox didn't give any clues and everything should have worked. I have debugged exactly the same thing before so I was able to help but since I have seen developers do this more than a couple of times, I thought I should mention this: <strong>Loading an XML file within Firefox hides all Namespace declarations</strong>. To actually see the document as its coming in, view source on the document and all namespaces will be seen there.<br />
The document he was parsing turned out to have a default namespace declaration in the root tag which means all the nodes were in that Namespace. The root tag of the xml document looked like:</p>
<div class="igBar"><span id="lxml-3"><a href="#" onclick="javascript:showPlainTxt('xml-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-3">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;response</span> <span style="color: #000066;">status</span>=<span style="color: #ff0000;">"0"</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">"some:ns:declaration"</span><span style="font-weight: bold; color: black;">&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Here is the code to actually parse such a document:</p>
<div class="igBar"><span id="lactionscript-4"><a href="#" onclick="javascript:showPlainTxt('actionscript-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-4">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> u:URLLoader = <span style="color: #000000; font-weight: bold;">new</span> URLLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">u.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, <span style="color: #0066CC;">onLoadComplete</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">u.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"document.xml"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">onLoadComplete</span><span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">XML</span>.<span style="color: #006600;">ignoreWhitespace</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> x:<span style="color: #0066CC;">XML</span> = <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #0066CC;">target</span>.<span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> ns = x.<span style="color: #006600;">namespace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"node value: "</span>+x.<span style="color: #006600;">ns</span>::node1.<span style="color: #006600;">ns</span>::node2<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Note the 'ns:: ... ' prefix to the node-names you are trying to reach.</p>
<p>Hope this helps <img src='http://www.arpitonline.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>More links on E4X and Flash:<br />
<a href="http://blogs.adobe.com/cantrell/archives/2009/10/referencing_reserved_words_in_e4x.html">Referencing ActionScript Reserved Words in E4X</a><a href="http://stackoverflow.com/questions/1547459/e4x-parse-a-document-with-namespaced-nodes-and-a-variable-to-be-evaluated"><br />
Parse a document with namespaced nodes and a variable to be evaluated</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.arpitonline.com/blog/2008/02/05/e4x-parsing-caveat-watchout-for-the-firefox-hidden-namespaces/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Be careful with the new Flash Player 9.0.115.0 security changes.</title>
		<link>http://www.arpitonline.com/blog/2008/01/13/be-careful-with-the-new-flash-player-901150-security-changes/</link>
		<comments>http://www.arpitonline.com/blog/2008/01/13/be-careful-with-the-new-flash-player-901150-security-changes/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 01:43:34 +0000</pubDate>
		<dc:creator>arpit</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=106</guid>
		<description><![CDATA[I am surprised this isn't talked about more in the blogosphere. The only reason I got to this was because a couple of my Flash applications broke this weekend and it took a lot of digging by quite a few of us on my team before we got to the root of the problem. So [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 20px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2008%2F01%2F13%2Fbe-careful-with-the-new-flash-player-901150-security-changes%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.arpitonline.com%2Fblog%2F2008%2F01%2F13%2Fbe-careful-with-the-new-flash-player-901150-security-changes%2F" height="61" width="51" /></a></div><p>I am surprised this isn't talked about more in the blogosphere. The only reason I got to this was because a couple of my Flash applications broke this weekend and it took a lot of digging by quite a few of us on my team before we got to the root of the problem. So here is the deal: With all the goodies that have come with the latest Flash Player, one of the features that seems to have arrived is a stricter security model. There is a complete article on the updated security model can be found <a href="http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html">here on the Adobe Devnet site</a>. A more bite sized sum-up of the article can be found <a href="http://marstonstudio.com/index.php/2007/12/06/new-security-policy-settings-in-flash-moviestar/">here</a>. As you see, the 2 big changes is the move to XML schemas rather than DTDs and a new site-control tag for meta-policies on crossdomain access. </p>
<p>Ah, so that's breaking my app. </p>
<p>Well, not really. Before we updated our crossdomain.xml files, I just wanted to confirm that that was indeed the problem. So I enabled logging on my Flash Player (to see how to do that check the logging section on the article <a href="http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_05.html#_Using_Logging">here</a>). The log though surprised me. Here is what I saw (I have edited the site names where I was seeing the issues):</p>
<p><code>Error: [strict] Ignoring policy file at http://[site name]/crossdomain.xml due to missing Content-Type.  See http://www.adobe.com/go/strict_policy_files to fix this problem.<br />
Error: Request for resource at http://[site name] by requestor from http://[swf url] is denied due to lack of policy file permissions.</code></p>
<p>Yikes. So seems the problem was that our server was not sending Content-Type headers for the xml files and the new Flash Player is a lot more strict about that, rejecting such crossdomain.xml files. </p>
<p>Hopefully this helps someone out there. If you do load data across domains, do verify they work on the new Flash Player. </p>
<p>[Update] Also check out the changes to authorization headers support for basic HTTP Auth:<br />
<a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=kb403184&#038;sliceId=1">http://kb.adobe.com/selfservice/viewContent.do?externalId=kb403184&#038;sliceId=1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.arpitonline.com/blog/2008/01/13/be-careful-with-the-new-flash-player-901150-security-changes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
