<?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>SitePoint » Learn CSS &#124; HTML5 &#124; JavaScript &#124; Wordpress &#124; Tutorials-Web Development &#124; Reference &#124; Books and More &#187; Flash</title> <atom:link href="http://www.sitepoint.com/category/tech/flash/feed/" rel="self" type="application/rss+xml" /><link>http://www.sitepoint.com</link> <description></description> <lastBuildDate>Sun, 27 May 2012 15:59:16 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>Adobe Shifts Flash Focus</title><link>http://www.sitepoint.com/adobe-shifts-flash-focus/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=adobe-shifts-flash-focus</link> <comments>http://www.sitepoint.com/adobe-shifts-flash-focus/#comments</comments> <pubDate>Mon, 27 Feb 2012 16:22:34 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[News & Trends]]></category> <category><![CDATA[Web Tech]]></category> <category><![CDATA[adobe]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <category><![CDATA[html5 dev centre]]></category> <category><![CDATA[HTML5 Tutorials & Articles]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=51852</guid> <description><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2010/05/327-flash-crash-50x50.png" class="attachment-thumbnail wp-post-image" alt="327-flash-crash" title="327-flash-crash" />Adobe has published a roadmap for the Flash runtimes and reassured developers that it will meet their needs over the next five to ten years. Craig discusses whether Flash can compete against HTML5.]]></description> <content:encoded><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2010/05/327-flash-crash-50x50.png" class="attachment-thumbnail wp-post-image" alt="327-flash-crash" title="327-flash-crash" /><p></p><p><em>(Try saying that title after a few drinks!)</em></p><p>Flash has reached a crossroads. It&#8217;s been the only reliable rich-media delivery platform for the past decade but the technology is being attacked on several fronts:</p><ul><li><strong>HTML5</strong>. Native browser audio, video and features such as canvas provide an alternative to Flash. They&#8217;re not without their own set of issues but are backed by many large IT companies.</li><li><strong>Apple</strong>. Whether it was technical, commercial or political reasons, Apple banned Flash on the iPhone and iPad. That policy ultimately led to <a
href="http://www.sitepoint.com/adobe-abandons-mobile-flash/">Adobe abandoning Flash on mobile devices</a> (although AIR can still be used to create cross-platform <em>&#8216;native&#8217;</em> applications).</li><li><strong>Competing plugins</strong>. To a lesser extent, alternatives such as Microsoft&#8217;s Silverlight and Google&#8217;s native client want a slice of Adobe&#8217;s market.</li></ul><p>Developer opinions range from <em>&#8220;HTML5 will never supersede Flash&#8221;</em> to <em>&#8220;Flash is dead and buried&#8221;</em>. Personally, I think it&#8217;s good to have a range of options but the days of Flash being the only contender are long gone. Which is why it&#8217;s refreshing to see a little commercial honesty in <a
href="http://www.adobe.com/devnet/flashplatform/whitepapers/roadmap.html">Adobe&#8217;s roadmap for the Flash runtimes</a>.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>Adobe is shifting focus to gaming and premium video. The company believes Flash is particularly suited to those markets and is concentrating its efforts accordingly:</p><blockquote><p> Increasingly, rich motion graphics will be deployed directly via the browser using HTML5, CSS3, JavaScript and other modern web technologies. While the primary role of Flash Player as an engine for innovation on the web remains the same, what it is used for will change.</p><p>Adobe believes that the Flash runtimes are particularly and uniquely suited for two primary use cases: creating and deploying rich, expressive games with console-quality graphics and deploying premium video.</p><p>This shift in focus for Flash does not mean that existing content will no longer run, or that Flash cannot be used for content other than gaming and premium video. However, it does mean that when prioritizing future development and bug fixes, gaming and premium video use cases will take priority.</p></blockquote><p>My favorite quote:</p><blockquote><p> Adobe believes that Flash is the game console for the web</p></blockquote><p>It&#8217;s a sensible move. Reliable native video is a few years away; vendors are yet to agree on a single codec and IE8 usage will remain high until Windows XP dies. You can use Flash as a fallback but, if you&#8217;re doing that, there&#8217;s little point using a multitude of HTML5 formats.</p><p>HTML5 gaming is possible but can be a lot of effort &#8212; especially if you&#8217;re relying on newer technologies such as 3D transforms or WebGL. Flash offers a more consistent platform although the gap is narrowing.</p><p>Adobe is reassuring Flash developers that the runtime will meet their needs over the next five to ten years. If you&#8217;re using Flash now, there&#8217;s no immediate reason to panic (unless your audience is primarily mobile users). Ironically, Flash&#8217;s advantages will dwindle to nil once Adobe&#8217;s own development tools can export native HTML5. The plug-in will become irrelevant but that doesn&#8217;t mean ActionScript and its associated technologies can&#8217;t be used.</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/adobe-shifts-flash-focus/feed/</wfw:commentRss> <slash:comments>23</slash:comments> </item> <item><title>RubySource: Smelly Cucumbers</title><link>http://rubysource.com/smelly-cucumbers/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rubysource-smelly-cucumbers</link> <comments>http://rubysource.com/smelly-cucumbers/#comments</comments> <pubDate>Fri, 13 Jan 2012 21:31:16 +0000</pubDate> <dc:creator>Dave Kennedy</dc:creator> <category><![CDATA[.NET]]></category> <category><![CDATA[BDD]]></category> <category><![CDATA[Best Practices]]></category> <category><![CDATA[CGI & Perl Tutorials]]></category> <category><![CDATA[Cucumber]]></category> <category><![CDATA[DR]]></category> <category><![CDATA[Flash]]></category> <category><![CDATA[Gems]]></category> <category><![CDATA[iOS]]></category> <category><![CDATA[News & Trends]]></category> <category><![CDATA[rails]]></category> <category><![CDATA[ruby]]></category> <category><![CDATA[Ruby Testing]]></category> <category><![CDATA[Tech]]></category> <category><![CDATA[Web Tech]]></category> <category><![CDATA[best practices]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=50238</guid> <description><![CDATA[ It was such a cliche of a title, I just had to use it. I’m sure you have heard of the great BDD tool Cucumber , but what you may not know about is how smelly cukes can be. I have recently been revising and refactoring my cucumber features in absolute disgust. In my defense, I started writing cucumber in earnest 6-7 months ago]]></description> <content:encoded><![CDATA[<p></p><p>It was such a cliche of a title, I just had to use it. I’m sure you have heard of the great BDD tool Cucumber , but what you may not know about is how smelly cukes can be. I have recently been revising and refactoring my cucumber features in absolute disgust. In my defense, I started writing cucumber in earnest 6-7 months ago</p><p>See more here:<br
/> <a
title="RubySource: Smelly Cucumbers" href="http://rubysource.com/smelly-cucumbers/" target="_blank">RubySource: Smelly Cucumbers</a></p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://rubysource.com/smelly-cucumbers/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>CloudSpring: Build Your App in the Cloud with Heroku and the Facebook SDK</title><link>http://feedproxy.google.com/~r/cloudspring/~3/vFNSyG3mhjw/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cloudspring-build-your-app-in-the-cloud-with-heroku-and-the-facebook-sdk</link> <comments>http://feedproxy.google.com/~r/cloudspring/~3/vFNSyG3mhjw/#comments</comments> <pubDate>Wed, 04 Jan 2012 04:39:20 +0000</pubDate> <dc:creator>Vito Tardia</dc:creator> <category><![CDATA[bootstrap]]></category> <category><![CDATA[Business]]></category> <category><![CDATA[Cloud]]></category> <category><![CDATA[cloud api]]></category> <category><![CDATA[DR]]></category> <category><![CDATA[facebook]]></category> <category><![CDATA[Flash]]></category> <category><![CDATA[frameworks]]></category> <category><![CDATA[Gems]]></category> <category><![CDATA[Get Started]]></category> <category><![CDATA[Getting Started]]></category> <category><![CDATA[Heroku]]></category> <category><![CDATA[iOS]]></category> <category><![CDATA[links]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[RoR]]></category> <category><![CDATA[ruby]]></category> <category><![CDATA[sdk]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[twitter]]></category> <category><![CDATA[urls]]></category> <category><![CDATA[Web Tech]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=49831</guid> <description><![CDATA[ When I first came across Heroku it was a Ruby-only cloud service. I wasn’t a Ruby developer so I quickly forgot about it. But then they partnered with Facebook and you could create a Facebook app hosted on Heroku with the Facebook PHP-SDK in just a couple of clicks. Now the question: is it possible to create a PHP application with Heroku that works both outside and inside of Facebook? ]]></description> <content:encoded><![CDATA[<p></p><p>When I first came across Heroku it was a Ruby-only cloud service. I wasn’t a Ruby developer so I quickly forgot about it. But then they partnered with Facebook and you could create a Facebook app hosted on Heroku with the Facebook PHP-SDK in just a couple of clicks. Now the question: is it possible to create a PHP application with Heroku that works both outside and inside of Facebook?</p><p>Original post:<br
/> <a
target="_blank" href="http://feedproxy.google.com/~r/cloudspring/~3/vFNSyG3mhjw/" title="Build Your App in the Cloud with Heroku and the Facebook SDK">Build Your App in the Cloud with Heroku and the Facebook SDK</a></p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://feedproxy.google.com/~r/cloudspring/~3/vFNSyG3mhjw/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>RubySource: Basecamp-like Subdomains with Devise</title><link>http://rubysource.com/basecamp-like-subdomains-with-devise/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rubysource-basecamp-like-subdomains-with-devise</link> <comments>http://rubysource.com/basecamp-like-subdomains-with-devise/#comments</comments> <pubDate>Thu, 08 Dec 2011 22:18:14 +0000</pubDate> <dc:creator>Dave Kennedy</dc:creator> <category><![CDATA[Content]]></category> <category><![CDATA[Design]]></category> <category><![CDATA[DR]]></category> <category><![CDATA[Flash]]></category> <category><![CDATA[Gems]]></category> <category><![CDATA[Layout]]></category> <category><![CDATA[modules]]></category> <category><![CDATA[rails]]></category> <category><![CDATA[Rails Tutorials]]></category> <category><![CDATA[RSpec]]></category> <category><![CDATA[ruby]]></category> <category><![CDATA[Ruby Tutorials]]></category> <category><![CDATA[Tech]]></category> <category><![CDATA[Web Tech]]></category> <category><![CDATA[rails tutorials]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=48966</guid> <description><![CDATA[ Building authentication for applications is a run of the mill task we have all encountered at some point or another. In the past, most developers would have reached into their tool belt and pulled out restful authentication . Lately, a new kid on the block has been stealing a lot of thunder where authentication is concerned, and with good reason. ]]></description> <content:encoded><![CDATA[<p></p><p> Building authentication for applications is a run of the mill task we have all encountered at some point or another. In the past, most developers would have reached into their tool belt and pulled out restful authentication . Lately, a new kid on the block has been stealing a lot of thunder where authentication is concerned, and with good reason.</p><p>View the original here:<br
/> <a
target="_blank" href="http://rubysource.com/basecamp-like-subdomains-with-devise/" title="RubySource: Basecamp-like Subdomains with Devise">RubySource: Basecamp-like Subdomains with Devise</a></p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://rubysource.com/basecamp-like-subdomains-with-devise/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item><div><div
class="post_box two_ads" style="float:left;padding-left:2px;"><div
id='div-gpt-ad-1328645237920-0' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328645237920-0'); });</script> </div></div></div><div
class="clear">&nbsp;</div> <item><title>DesignFestival: I Still Love Flash. Here’s Why.</title><link>http://feedproxy.google.com/~r/DesignFestival/~3/1Lt2cHs_FjM/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=designfestival-i-still-love-flash-here%25e2%2580%2599s-why</link> <comments>http://feedproxy.google.com/~r/DesignFestival/~3/1Lt2cHs_FjM/#comments</comments> <pubDate>Mon, 05 Dec 2011 17:25:24 +0000</pubDate> <dc:creator>Felix Mak</dc:creator> <category><![CDATA[Design]]></category> <category><![CDATA[Flash]]></category> <category><![CDATA[Opinion]]></category> <category><![CDATA[Web Design Tutorials & Articles]]></category> <category><![CDATA[Web Tech]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=48907</guid> <description><![CDATA[ In recent times, people from all quarters have been getting their boots into Flash. The late Steve Jobs felt that (other than the competing business model issues) supporting Flash was not in the interest of Apple’s customers and that iOS products would not support it. A week or two ago, I came across the Occupy Flash movement. ]]></description> <content:encoded><![CDATA[<p></p><p> In recent times, people from all quarters have been getting their boots into Flash. The late Steve Jobs felt that (other than the competing business model issues) supporting Flash was not in the interest of Apple’s customers and that iOS products would not support it. A week or two ago, I came across the Occupy Flash movement.</p><p>More:<br
/> <a
target="_blank" href="http://feedproxy.google.com/~r/DesignFestival/~3/1Lt2cHs_FjM/" title="DesignFestival: I Still Love Flash. Here’s Why.">DesignFestival: I Still Love Flash. Here’s Why.</a></p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://feedproxy.google.com/~r/DesignFestival/~3/1Lt2cHs_FjM/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>RubySource: Happenings in Ruby</title><link>http://rubysource.com/happenings-in-ruby/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rubysource-happenings-in-ruby</link> <comments>http://rubysource.com/happenings-in-ruby/#comments</comments> <pubDate>Fri, 02 Dec 2011 22:34:57 +0000</pubDate> <dc:creator>Glenn Goodrich</dc:creator> <category><![CDATA[.NET]]></category> <category><![CDATA[Community]]></category> <category><![CDATA[Content]]></category> <category><![CDATA[DR]]></category> <category><![CDATA[Flash]]></category> <category><![CDATA[links]]></category> <category><![CDATA[loccasions]]></category> <category><![CDATA[Misc]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[rails]]></category> <category><![CDATA[ruby]]></category> <category><![CDATA[Links]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=48796</guid> <description><![CDATA[ There I was, sitting at my desk looking over the upcoming article schedule for Rubysource, when I realized I had inadvertently published TWO articles on Wednesday. The immediate consequence of my stupidity is we’d have no article to run on Friday (we try to publish M-W-F around here) and I’d have to fend off a bunch of different questions that all had the same answer: “Because I am stupid.” It’s our reaction in times of high adversity that define who we are as managing editors. Our first reaction was to smash our head on the desk while coming up with various adjectives about ourselves. Our second reaction was, inexplicably, to start referring to ourselves in plural third person, like royalty]]></description> <content:encoded><![CDATA[<p></p><p> There I was, sitting at my desk looking over the upcoming article schedule for Rubysource, when I realized I had inadvertently published TWO articles on Wednesday. The immediate consequence of my stupidity is we’d have no article to run on Friday (we try to publish M-W-F around here) and I’d have to fend off a bunch of different questions that all had the same answer: “Because I am stupid.” It’s our reaction in times of high adversity that define who we are as managing editors. Our first reaction was to smash our head on the desk while coming up with various adjectives about ourselves. Our second reaction was, inexplicably, to start referring to ourselves in plural third person, like royalty</p><p>See more here:<br
/> <a
target="_blank" href="http://rubysource.com/happenings-in-ruby/" title="Happenings in Ruby">Happenings in Ruby</a></p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://rubysource.com/happenings-in-ruby/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>DesignFestival: With Adobe decision to stop work on mobile Flash, HTML5 emerges as the victor</title><link>http://feedproxy.google.com/~r/DesignFestival/~3/3OUYQynk46U/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=designfestival-with-adobe-decision-to-stop-work-on-mobile-flash-html5-emerges-as-the-victor</link> <comments>http://feedproxy.google.com/~r/DesignFestival/~3/3OUYQynk46U/#comments</comments> <pubDate>Thu, 10 Nov 2011 00:59:16 +0000</pubDate> <dc:creator>Joel Falconer</dc:creator> <category><![CDATA[Design]]></category> <category><![CDATA[Flash]]></category> <category><![CDATA[News & Trends]]></category> <category><![CDATA[Web Tech]]></category> <category><![CDATA[news]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/?p=47755</guid> <description><![CDATA[ Today is a significant day for the design industry: news that Adobe has discontinued work on its mobile Flash player in favor of a new focus on HTML5 leaked out of the company today, with an official announcement expected tomorrow. Those of us in the design and technology industries knew it was just a matter of time. Anyone who won’t admit that Flash’s days are numbered hasn’t been keeping a close eye on the industry. Many point to Apple’s stubborn refusal to support Flash as the death knell for the platform, but it’s not a stretch to say that it was heading towards a gradual end even before that]]></description> <content:encoded><![CDATA[<p></p><p> Today is a significant day for the design industry: news that Adobe has discontinued work on its mobile Flash player in favor of a new focus on HTML5 leaked out of the company today, with an official announcement expected tomorrow. Those of us in the design and technology industries knew it was just a matter of time. Anyone who won’t admit that Flash’s days are numbered hasn’t been keeping a close eye on the industry. Many point to Apple’s stubborn refusal to support Flash as the death knell for the platform, but it’s not a stretch to say that it was heading towards a gradual end even before that</p><p>Follow this link:<br
/> <a
target="_blank" href="http://feedproxy.google.com/~r/DesignFestival/~3/3OUYQynk46U/" title="DesignFestival: With Adobe decision to stop work on mobile Flash, HTML5 emerges as the victor">DesignFestival: With Adobe decision to stop work on mobile Flash, HTML5 emerges as the victor</a></p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://feedproxy.google.com/~r/DesignFestival/~3/3OUYQynk46U/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>RubySource: Rails Deep Dive: Loccasions, Authentication</title><link>http://feedproxy.google.com/~r/RubySource/~3/utA0ih7Nxpc/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rubysource-rails-deep-dive-loccasions-authentication</link> <comments>http://feedproxy.google.com/~r/RubySource/~3/utA0ih7Nxpc/#comments</comments> <pubDate>Wed, 14 Sep 2011 14:37:44 +0000</pubDate> <dc:creator>Glenn Goodrich</dc:creator> <category><![CDATA[Business]]></category> <category><![CDATA[Content]]></category> <category><![CDATA[Design]]></category> <category><![CDATA[Events]]></category> <category><![CDATA[Flash]]></category> <category><![CDATA[Gems]]></category> <category><![CDATA[Layout]]></category> <category><![CDATA[loccasions]]></category> <category><![CDATA[rails]]></category> <category><![CDATA[Rails Tutorials]]></category> <category><![CDATA[RoR]]></category> <category><![CDATA[ruby]]></category> <category><![CDATA[RVM]]></category> <category><![CDATA[S3]]></category> <category><![CDATA[Tutorial]]></category> <category><![CDATA[content]]></category> <category><![CDATA[events]]></category> <category><![CDATA[gems]]></category> <category><![CDATA[rails tutorials]]></category> <category><![CDATA[rvm]]></category> <category><![CDATA[tutorial]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/rubysource-rails-deep-dive-loccasions-authentication/</guid> <description><![CDATA[ In the last post , we finished our first user story. That user story was pretty simple, but it flushed out the design of our home page. The next user story, As an administrator, I want to invite users to Loccasions is not quite so simple. The implications from this user story are big: First, we have a new role, administrator, which brings our roles to two (unregistered user and administrator). ]]></description> <content:encoded><![CDATA[<p></p><p> In the last post , we finished our first user story. That user story was pretty simple, but it flushed out the design of our home page. The next user story, As an administrator, I want to invite users to Loccasions is not quite so simple. The implications from this user story are big: First, we have a new role, administrator, which brings our roles to two (unregistered user and administrator).</p><p>Read the original post:<br
/> <a
target="_blank" href="http://feedproxy.google.com/~r/RubySource/~3/utA0ih7Nxpc/" title="RubySource: Rails Deep Dive: Loccasions, Authentication">RubySource: Rails Deep Dive: Loccasions, Authentication</a></p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://feedproxy.google.com/~r/RubySource/~3/utA0ih7Nxpc/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item><div><div
class="post_box two_ads" style="float:left;padding-left:2px;"><div
id='div-gpt-ad-1328645237920-1' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328645237920-1'); });</script> </div></div></div><div
class="clear">&nbsp;</div> <item><title>Flash Catalyst: Mockup to Masterpiece, Part II</title><link>http://www.sitepoint.com/flash-catalyst-flash-builder-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flash-catalyst-flash-builder-2</link> <comments>http://www.sitepoint.com/flash-catalyst-flash-builder-2/#comments</comments> <pubDate>Mon, 27 Jul 2009 14:00:00 +0000</pubDate> <dc:creator>Andrew Muller</dc:creator> <category><![CDATA[Flash]]></category> <guid
isPermaLink="false">http://blogs.sitepoint.com/?p=34845</guid> <description><![CDATA[In the first part of this series, Andrew showed us how easy it is to mock up an application interface in Adobe Illustrator and Flash Catalyst. In part II, we'll add the rest of the code.]]></description> <content:encoded><![CDATA[<p></p><p><strong>In <a
class="sublink" href="http://www.sitepoint.com/article/flash-catalyst-flash-builder">part one of this article</a> we started building a small Rich Internet Application that would display music charts using data from a YQL query. We started with Adobe Illustrator to mock up the user interface for our app, then transferred the Illustrator file into Flash Catalyst to begin converting the design into an interactive piece. </strong></p><p><strong>In part two, we will continue adding interactivity in Catalyst, and then move into Flash Builder to finish it up. For fun, <a
class="sublink" href="http://www.sitepoint.com/quiz/adobe/flash-catalyst-flash-builder-2">there&#8217;s a quiz at the end!</a></strong></p><h5>Creating Buttons From The Artwork</h5><p>Each of the tabs on the left of our application will now be converted into a button component. We&#8217;ll do this by selecting both the text and background graphic for the first tab, and using the Heads Up Display (HUD) to convert it into a button. Repeat this process for the other two tab graphics.</p><p><img
src="http://i2.sitepoint.com/graphics/1740_screenshot06.png"  height="326" width="161" alt="Selecting the Popular Artists arrow" /></p><p><img
src="http://i2.sitepoint.com/graphics/1740_screenshot07.thumb.png"  height="223" width="400" alt="Converting the art to a Button component" /><div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>Button components have four states:</p><p><ul><li><strong>Up</strong>, as a normal state for the button</li><li><strong>Over</strong>, when the mouse is hovering over the button</li><li><strong>Down</strong>, for when the button is being clicked</li><li><strong>Disabled</strong>, for when the button may not be pressed</li></ul><p>Buttons for each of these states appear within the HUD whenever one of your buttons has been selected. We can edit each of the states&#8217; graphics individually by clicking on them.</p><p><img
src="http://i2.sitepoint.com/graphics/1740_screenshot08.thumb.png"  height="36" width="400" alt="Up, over, down, and disabled states" /></p><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>Double-click on the button with the blue arrow graphic to select it, and copy the button. Use the breadcrumb at the top of the Design area to switch out of the button, and then double-click one of the other two buttons. Go to the Over state, delete the graphic that&#8217;s there, then paste the blue arrow in its place. To align it precisely, look at the <strong>Properties</strong> panel and set the X and Y values to 0. You should now find that the arrow is positioned perfectly.</p><p>Something missing? The text in that state will most likely have disappeared, because the blue arrow will have been placed into a new layer above the text. To make it reappear, simply go to the <strong>Layers</strong> panel and grab and drag the text layer and drop it above the new graphic layer. This text will also need a change of font color.</p><p>Currently, Catalyst&#8217;s ability to edit graphics is quite limited. We&#8217;re able to modify this label&#8217;s size and opacity, but to change other attributes like color or font, we need to return to Illustrator. To do that, right click on the text object and choose <strong>Edit in Adobe Illustrator CS4.</strong>. You can do this either in the design area, or within the <strong>Layers</strong> palette.</p><p><img
src="http://i2.sitepoint.com/graphics/1740_screenshot09.thumb.png"  height="400" width="331" alt="Edit in Adobe Illustrator CS4" /></p><p>This will launch the artwork in Illustrator &#8211; only the text will be editableâ€š and the remaining content will be disabled. You&#8217;ll also see a bold yellow message above the Illustrator artboard, telling you to save and close the window when you&#8217;re finished.</p><p>In Illustrator, change the font colour to white and save. Illustrator will prompt you to save with FXG optionsâ€š FXG is the new language that Catalyst uses to exchange graphics between itself and Adobe design tools like Illustrator and Photoshop. Accept the defaults and close the file in Illustrator, and then switch back to Catalyst. There&#8217;ll be a dialog asking you whether you want to accept the Illustrator changes. Accept them, and you&#8217;ll see the text with its new colour.</p><p>Repeat that process for the button&#8217;s Down state. You&#8217;ll need to copy a grey background from one of the other two buttons to use for the Up and Disabled states in the Popular Artists button as it had the blue arrow graphic when we created it. You&#8217;ll also need to change the colour of the font for this button in Illustrator to black for the Up and Disabled statesâ€š so let&#8217;s do that now.</p><p><div
class="article-cms-pagebreak"></div></p><h5>Adding States to the Repeated Item</h5><p>Back in part one, we created a Data List component for the list of tracks. The repeated item in the Data List features some interactivity that may not be apparent until testingâ€š you can do this by choosing <strong>File</strong> &gt; <strong>Run Project</strong>. In your browser, you&#8217;ll see the application appear in a new tab or window. You should notice that when you roll over or click on an item, the items reveal a subtle light blue background: we&#8217;re going to adjust the background colour to be a bit brighter.</p><p>Double-click on the repeated item component to open it, and you&#8217;ll see the three states that represent different interactionsâ€š normal, hovered, and selected. Managing the appearance of the way the item changes across states is relatively easy; we simply edit the appearance of the object in each state, much as we did for buttons.</p><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>First, we&#8217;ll modify the colour of the background in the Hovered state. Right click on the background image and choose <strong>Edit in Adobe Illustrator CS4.</strong>. Change the fill colour of the graphic to a shade to your liking. Save the changes in Illustrator and switch back to Catalyst, accepting the change it asks for. You&#8217;ll see that the background colour of the Hovered state has been updated. We can do the same for the Selected state.</p><p>The music chart up/down arrow needs states too; we&#8217;ll show an up or down arrow to show how the track has changed chart position lately. Since none of the pre-set component types in Catalyst will be able to help us with this task, we&#8217;ll need to convert the arrow into a custom component. Select the arrow and select <strong>Custom/Generic Component</strong> from the <strong>Convert Artwork</strong> list. Then, choose <strong>Duplicate State</strong> from the top left of the screenâ€š it&#8217;s a small button just below the <strong>Pages/State</strong> list. At the top right of Catalyst is a toolbar: clicking the last one, <strong>Transform</strong>, will let you rotate the arrow to point down. Double-clicking on the name of a state will allow you to rename it. Here, I&#8217;ve named the states <code>trackUp</code> and <code>trackDown</code>, respectively.</p><p><img
src="http://i2.sitepoint.com/graphics/1740_screenshot11.thumb.png"  height="269" width="400" alt="Editing the arrow" /></p><h5>Adding States To The Application</h5><p>The list will look a little empty until the user has selected a music chart to display. We&#8217;re going to set the application to start with the list hidden, only displaying it once the data has been fetched from Yahoo. We&#8217;re going to use two application states to achieve this effect.</p><p>Duplicate the current state and rename it to <code>defaultState</code>, then name the second one <code>chartState</code>. Select the Data List in <code>defaultState</code> and delete it: you&#8217;ll see that the list is still in the second state when you switch between the two.</p><p><img
src="http://i2.sitepoint.com/graphics/1740_screenshotStates.png"  height="129" width="374" alt="Our two states: defaultState and chartState" /></p><p>When a user presses one of the chart buttons on the left, we&#8217;d like to show the <code>chartState</code>. To make this happen, we&#8217;ll choose one of the buttons in the first state and select the plus button to the right of <strong>Custom Interactions</strong> in the HUD. Choose <strong>On Click</strong> from the list. From <strong>On Click Interactions</strong> choose <strong>Play transition to state</strong> and choose <code>chartState</code> from the list. For the user, clicking on the button will make the list appear. Later, we&#8217;ll add code to that button in Flash Builder to call a Yahoo YQL query to fetch the data to display in the list.</p><p><img
src="http://i2.sitepoint.com/graphics/1740_screenshotNewCustomInteraction.thumb.png"  height="219" width="400" alt="Adding a new custom interaction" /></p><p><img
src="http://i2.sitepoint.com/graphics/1740_screenshotPlayTransitionToStates.thumb.png"  height="284" width="400" alt="On click, the button will make a transition to chartState" /></p><p>Repeat the process for each of the buttons. With the interactions added you should see that each object has a Fade transition effect added to the Timeline below the design view. The switch between states&#8217; actions can be animated with that Fade effect. Sliding the effect in the Timeline to control it is quite intuitive: simply grab it and move it. You&#8217;re now ready to test the interactions. Choose <strong>File</strong> &gt; <strong>Run Project</strong> to run the application again, and click on the buttons to see the change between states. Adjust the interaction changes in the Timeline to taste.</p><p><div
class="article-cms-pagebreak"></div></p><p>We&#8217;re going to add one more state to the application to serve as a detail view for the repeated items: this will use the artwork from the detailed view we created all the way back in part one. The additional panel will behave like a pop up to display other releases for a selected artist.</p><p>Start by duplicating <code>chartState</code> &#8211; call the new state <code>artistDetailState</code>. The design has a pop over panel to display the new information. We&#8217;re going to dim the current content for this state as the detail panel appears. Do this by selecting all the items in the state except the background graphic, and set their opacity to 40 in the properties panel.</p><p>If you look carefully at the <strong>Layers</strong> palette you&#8217;ll see a layer called <strong>Overlay</strong>. This contains all the objects that will be shown in the detail state. When we do this, we&#8217;ll make the repeated item a button. Go back to chartState and enter the Data List component by double-clicking on it, then open the repeated item by double-clicking again, and select its background. Convert the background into a button using the HUD and set its <strong>On Click</strong> event to play to <code>artistDetailState</code>. The Fade effect in the Timeline will do a really nice job of transitioning the opacity later on if you choose to use it. The detail view has repeated data in its design. Later, we&#8217;ll convert this to a component in Flash Builder. For now, delete the text, leaving the title text as is.</p><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>Oopsâ€š I&#8217;ve just realised we forgot to provide a way of closing the panel in the artwork! This is a great excuse to show you how to create a new button from scratch in Catalyst.</p><p>To do it, draw a circle with the Ellipse tool found in the toolbar at the top right of Catalystâ€š it looks like a circle itself. Add a letter X with the Text tool to the center of the circle and select the two, converting them to a button from the HUDâ€š feel free to edit the button to have other graphics in the other states if required. Add an On Click interaction to the new button and set it to switch back to <code>chartState</code> to close the panel.</p><p>With all of the interactions the way we want them, we&#8217;re almost ready to complete the project in Flash Builder! This is a great time to double-check that you&#8217;ve saved your work.</p><h5>Coding Data Services In Flash Builder</h5><p>While we&#8217;ve been working on our project, Catalyst has been building a number of MXML files that Flash Builder can compile to Flash. It&#8217;s possible to view that code right here in Catalyst by switching from Design to Code viewâ€š do this by using the pull-down menu at the top right in Catalyst. Save the Catalyst project and then launch Flash Builder.</p><p>In Flash Builder, you can create a project from an FXP file by selecting <strong>File</strong> &gt; <strong>Import Flex Project (FXP)</strong>. Using the navigator on the left, locate the project&#8217;s root file at <strong>src &gt; (default package) &gt; Main.mxml</strong>. You&#8217;ll see that there is a <code>fx:Script</code> block at the top of the code that contains functions for each of the three buttons that you created in Flash Catalyst. Also, note the <code>s:transitions</code> tag pair, which contains any transition effects you may have added via the Timeline in Catalyst. Below that the states are defined in the <code>s:states</code> tag pair. Finally, you should see buttons and other visual elements, all of which have been assigned instance names that we can access from ActionScript.</p><p>We&#8217;re going to be calling a Yahoo service called YQL to fill our application with data. It&#8217;s a language that you can use to query data from web services. You will need to have a developer account with Yahoo to build and test with YQL: <a
class="sublink" href="http://developer.yahoo.com/yql/">more details can be found at the Yahoo developers&#8217; site.</a> YQL queries are simply URLs with your query attached as a string at the end. You can choose to have the results returned as either XML or JSON using an additional variable at the end of the URL to indicate the return typeâ€š <code>&amp;format=xml</code> or <code>&amp;format=json</code>, respectively.</p><p>The Flex <code>HTTPService</code> component is used to call a remote HTTP service. We need to add one <code>HTTPService</code> for each YQL call, and both these tags need to be nested in a pair of <code>fx:Declarations</code> tags.</p><p>Below is an example of a <code>HTTPService</code> call to a YQL service to retrieve the most popular music tracks. The URL value of the tag is the YQL query. The tag&#8217;s result attribute indicates what function to use once the query result is received. Flash Builder will prompt to create the outline of a function for you if you add that attribute, which is what we&#8217;ve chosen to do here. The <code>resultFormat</code> attribute is used to indicate how the result&#8217;s data will be typed. To provide feedback to the user, we&#8217;ve also used the <code>showBusyCursor</code> attribute to change the cursor while the data is being fetched.</p><pre><code>&lt;s:HTTPService id=&quot;trackPopularService&quot; &nbsp; &nbsp;<br /> &nbsp;url=&quot;http://query.yahooapis.com/v1/public/yql? &nbsp; <br /> &nbsp;q=select%20*%20from%20music.track.popular&quot; &nbsp; <br /> &nbsp;result=&quot;releasePopularService_resultHandler(event)&quot; &nbsp; <br /> &nbsp;resultFormat=&quot;xml&quot; showBusyCursor=&quot;true&quot;/&gt;</code></pre><p>These services will be called by clicking on one of the buttons that we created in Flash Catalyst. There&#8217;s a click handler function for each button already in the <code>fx:Script</code> block at the top of the code. These click handlers were created in order of button creation by Catalyst &#8211; you may need to run the application later to double check that the names match the positions. Here&#8217;s an example of one of these button click handlers: we&#8217;ve added a second line to it to call the URL of the <code>HTTPService</code> discussed above.</p><pre><code>protected function Button_click():void &nbsp; <br /> &nbsp;{ &nbsp; <br /> &nbsp; &nbsp;currentState='chartState'; &nbsp; <br /> &nbsp; &nbsp;trackPopularService.send(); &nbsp; <br /> &nbsp;}</code></pre><p>The function that will be called once the result has been received has a <code>ResultEvent</code> parameter, which in turn has a <code>result</code> property. This is where we&#8217;ll find the XML data that we need to populate the Data List. Flex data components have a <code>dataProvider</code> property that typically has an <code>ArrayCollection</code> assigned as its value. This is a wrapper class that exposes an array as a collection, but essentially is an array of objects that has additional methods and properties. We&#8217;ve already defined a variable typed as <code>ArrayCollection</code> called <code>chartData</code> in the script block and made that bindable so that any component using that variable as a <code>dataProvider</code> will update if the <code>ArrayCollection</code> changes. Here&#8217;s that variable:</p><pre><code>[Bindable] private var chartData:ArrayCollection = new ArrayCollection();</code></pre><p>The function for the result of the first <code>HTTPService</code> call is listed below. You&#8217;ll notice that we reset the <code>chartData</code> <code>ArrayCollection</code> by re-initializing it. We then create an XML variable out of the event&#8217;s result property, then loop over the XML to parse it. With each iteration of the loop we create an object called <code>dataObj</code> and add properties to it which are equal to specific values in the XML. The last thing that we do in the loop is use the <code>ArrayCollection</code>&#8216;s <code>addItem</code> method to add <code>dataObj</code> to it.</p><pre><code>protected function releasePopularService_resultHandler(event:ResultEvent):void &nbsp; <br /> &nbsp;{ &nbsp; <br /> &nbsp; &nbsp;chartData = new ArrayCollection(); &nbsp; <br /> &nbsp; &nbsp;var resultsXML:XML = XML(event.result); &nbsp; <br /> &nbsp; &nbsp;var tracksXMLList:XMLList = resultsXML.child(&quot;results&quot;).children(); &nbsp; <br /> &nbsp; &nbsp;var len:Number = tracksXMLList.length(); &nbsp; <br /> &nbsp; &nbsp;for ( var i:Number = 0;i&lt;len;i++) { &nbsp; <br /> &nbsp; &nbsp; &nbsp;var dataObj:Object = new Object(); &nbsp; <br /> &nbsp; &nbsp; &nbsp;dataObj.track = tracksXMLList[i].attribute(&quot;title&quot;); &nbsp; <br /> &nbsp; &nbsp; &nbsp;dataObj.artist = tracksXMLList[i].child(&quot;Artist&quot;).attribute(&quot;name&quot;); &nbsp; <br /> &nbsp; &nbsp; &nbsp;dataObj.artistID = tracksXMLList[i].child(&quot;Artist&quot;).attribute(&quot;id&quot;); &nbsp; <br /> &nbsp; &nbsp; &nbsp;dataObj.chartNow = tracksXMLList[i].child(&quot;ItemInfo&quot;).child(&quot;ChartPosition&quot;).attribute(&quot;this&quot;); &nbsp; <br /> &nbsp; &nbsp; &nbsp;dataObj.chartPrevious = tracksXMLList[i].child(&quot;ItemInfo&quot;).child(&quot;ChartPosition&quot;).attribute(&quot;last&quot;); &nbsp; <br /> &nbsp; &nbsp; &nbsp;chartData.addItem(dataObj); &nbsp; <br /> &nbsp; &nbsp;} &nbsp; <br />}</code></pre><p><div
class="article-cms-pagebreak"></div></p><h5>Binding Data In Flash Builder</h5><p>The Data List we created in Catalyst is used as the skin for a Flex List component. That&#8217;s located in the code below the three buttons, which you&#8217;ll see in the following example. Catalyst has manually added values to populate the list by nesting an <code>ArrayCollection</code>. You&#8217;ll see that the <code>dataProvider</code> attribute is there, but has an empty string value. We&#8217;re going to delete that <code>ArrayCollection</code> and bind the <code>dataProvider</code> attribute to our <code>chartData</code> <code>ArrayCollection</code>. Below, you&#8217;ll notice I&#8217;ve used a pair of curly brackets, this will repopulate the list if the value of <code>chartData</code> changes.</p><pre><code>&lt;s:List x=&quot;200&quot; y=&quot;89&quot; skinClass=&quot;components.DataList1&quot; id=&quot;list1&quot; includeIn=&quot;artistDetailState,chartState&quot; alpha.artistDetailState=&quot;0.4&quot; dataProvider=&quot;{chartData}&quot;/&gt;</code></pre><p>The repeated item that we built in Catalyst is now a component in the Flex project. It&#8217;s stored in a file, <strong>RepeatedItem1.mxml</strong>, which can be found in the components folder of the project. Open it and you&#8217;ll see <code>RichText</code> components that we&#8217;ll need to populate with data from the List&#8217;s <code>dataProvider</code>. You should see that the text attribute of each of the <code>RichText</code> components is already bound to a property of an object called dataâ€š this is the collective name given to the values passed by the List component the current row as it loops over the <code>dataProvider</code>. We need to update the text attribute of each of these <code>RichText</code> tags to equal the data we&#8217;ve received.</p><div
id="adz" class="horizontal"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>The example code below is one of the <code>RichText</code> components from <strong>RepeatedItem1.mxml</strong>. Look at the text attribute of this tag and you&#8217;ll see that its value is bound using curly bracketsâ€š this means it will update to the current value assigned, which in this case is <code>data.chartNow</code>. The <code>chartNow</code> value is in the <code>chartData ArrayCollection</code> that we populated with the function detailed above. It&#8217;s one of the properties of the <code>dataObj</code> object that we built and populated while we looped over the XML data received from the YQL service call. Check the other <code>RichText</code> tags and you&#8217;ll see that we&#8217;ve also updated ours to equal other properties in the data from the <code>ArrayCollection</code>.</p><pre><code>&lt;s:RichText width=&quot;38&quot; height=&quot;54&quot; &nbsp; &nbsp;<br /> &nbsp;textAlign=&quot;center&quot; fontFamily=&quot;Helvetica&quot; &nbsp; &nbsp;<br /> &nbsp;fontSize=&quot;30&quot; lineHeight=&quot;120%&quot; color=&quot;0xffffff&quot; &nbsp; &nbsp;<br /> &nbsp;whiteSpaceCollapse=&quot;preserve&quot; kerning=&quot;on&quot; &nbsp; &nbsp;<br /> &nbsp;ai:knockout=&quot;0&quot; d:userLabel=&quot;5&quot; text=&quot;{data.chartNow}&quot; &nbsp; &nbsp;<br /> &nbsp;x=&quot;14&quot; id=&quot;richtext1&quot; y=&quot;18&quot;&gt;&lt;/s:RichText&gt;</code></pre><p>We&#8217;ve added a function to the <code>fx:Script</code> block of <strong>RepeatedItem1.mxml</strong> to change the display of the chart arrow to either up, down or hidden based on music chart movement. It&#8217;s using the chartNow and chartPrevious values from the same data we used to populate the <code>RichText</code> tags. The function is controlling the chart arrow component, which in this case will have a name like <code>customcomponent11</code>. That function is called each time we render a row by using the opening tag&#8217;s <code>render</code> event. You&#8217;ll find that in the first line of code in <strong>RepeatedItem1.mxml</strong> in our sample version. The function is detailed below:</p><pre><code>private function chartPosIndicator():void { &nbsp; &nbsp;<br /> &nbsp;if (data.chartPrevious == &quot;0&quot; ) { &nbsp; &nbsp;<br /> &nbsp; &nbsp;customcomponent11.visible = false; &nbsp; &nbsp;<br /> &nbsp; &nbsp;richtext2.text = &quot;new&quot;; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br /> &nbsp;} else if ( Number(data.chartNow) &lt; Number(data.chartPrevious) ) { &nbsp; &nbsp;<br /> &nbsp; &nbsp;customcomponent11.currentState = 'trackUp'; &nbsp; &nbsp;<br /> &nbsp;} else if ( data.chartNow == data.chartPrevious ) { &nbsp; &nbsp;<br /> &nbsp; &nbsp;customcomponent11.visible = false; &nbsp; &nbsp;<br /> &nbsp; &nbsp;richtext2.text = &quot;&quot;; &nbsp; &nbsp;<br /> &nbsp;} else if ( Number(data.chartNow) &gt; Number(data.chartPrevious) ) { &nbsp; &nbsp;<br /> &nbsp; &nbsp;customcomponent11.currentState = 'trackDown'; &nbsp; &nbsp;<br /> &nbsp;} &nbsp; &nbsp;<br />}</code></pre><p>The other function in <strong>RepeatedItem1.mxml</strong> calls a public method in the parent file, <strong>Main.mxml</strong>, passing the artistID and artist values for the current row.</p><pre><code>protected function Button_click():void &nbsp; &nbsp;<br />{ &nbsp; &nbsp;<br /> &nbsp;mx.core.FlexGlobals.topLevelApplication.showArtistReleases(data.artistID,data.artist); &nbsp; &nbsp;<br />}</code></pre><p>This function in turn assigns the values received to local variables already created, calls the send method of the last <code>HTTPService</code>, and changes the state of the application to <code>artistDetailState</code>.</p><pre><code> &nbsp; &nbsp;<br />public function showArtistReleases(selectedArtistID:Number,selectedArtistName:String):void { &nbsp; &nbsp;<br /> &nbsp;artistID = selectedArtistID; &nbsp; &nbsp;<br /> &nbsp;artistName = selectedArtistName; &nbsp; &nbsp;<br /> &nbsp;releaseArtistService.send(); &nbsp; &nbsp;<br /> &nbsp;currentState='artistDetailState'; &nbsp; &nbsp;<br />} &nbsp; &nbsp;<br /></code></pre><p>The fourth <code>HTTPService</code> call uses a parameter to retrieve releases for a specific artist. We need to use the data from the row that the user clicks on to make that work, which is why we&#8217;re using the two functions listed above. The first calls the second from within <strong>RepeatedItem1.mxml</strong>, passing the <code>artistID</code> needed as a parameter for the <code>HTTPService</code> call. Within the second function, we&#8217;re assigning that <code>artistID</code> to a local variable that we&#8217;re using within the <code>url</code> attribute of the last <code>HTTPService</code> call. Below is that URL, and if you look towards the end of the value you&#8217;ll see <code>{artistID}</code>, which is a binding to the variable.</p><pre><code>url=&quot;http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20music.release.artist%20where%20id%3D%22{artistID}%22&quot;</code></pre><p>The result handler function for that service call is similar to the other result functions. Instead of the <code>chartData</code> <code>ArrayCollection</code>, we&#8217;re populating another <code>ArrayCollection</code> called <code>otherReleasesArtist</code>. This is used to populate a <code>DataGrid</code> component that we&#8217;ve added to the details panel we build as part of this article. The panel can be found in the components directory as <strong>CustomComponent2.mxml</strong>. We&#8217;ve added an <code>ArrayCollection</code> to this component and used it as the <code>dataProvider</code> for the <code>DataGrid</code>, setting the <code>ArrayCollection</code> as public so that we can change its value from <strong>Main.mxml</strong> &#8211; this is set in the last line of the result handler listed below. We&#8217;re also setting the title of the panel to the <code>artistName</code> variable passed when <strong>RepeatedItem1.mxml</strong> was clicked.</p><pre><code> &nbsp; &nbsp;<br />protected function releaseArtistService_resultHandler(event:ResultEvent):void &nbsp; &nbsp;<br />{ &nbsp; &nbsp;<br /> &nbsp;otherReleasesArtist = new ArrayCollection(); &nbsp; &nbsp;<br /> &nbsp;var resultsXML:XML = XML(event.result); &nbsp; &nbsp;<br /> &nbsp;var tracksXMLList:XMLList = resultsXML.child(&quot;results&quot;).children(); &nbsp; &nbsp;<br /> &nbsp;var len:Number = tracksXMLList.length(); &nbsp; &nbsp; &nbsp;<br /> &nbsp;for ( var i:Number = 0;i&lt;len;i++) { &nbsp; &nbsp;<br /> &nbsp; &nbsp;var dataObj:Object = new Object(); &nbsp; &nbsp;<br /> &nbsp; &nbsp;dataObj.releaseTitle = tracksXMLList[i].attribute(&quot;title&quot;); &nbsp; &nbsp;<br /> &nbsp; &nbsp;dataObj.releaseYear = tracksXMLList[i].attribute(&quot;releaseYear&quot;);; &nbsp; &nbsp;<br /> &nbsp; &nbsp;otherReleasesArtist.addItem(dataObj); &nbsp; &nbsp;<br /> &nbsp;} &nbsp; &nbsp;<br /> &nbsp;customcomponent21.artistName = artistName; &nbsp; &nbsp;<br /> &nbsp;customcomponent21.otherReleasesData = otherReleasesArtist; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />}</code></pre><p>And that should be it! Save your work, and test your application by pressing the <strong>Run</strong> button at the top of Flash Builder.  If all went well, chart data should start flowing into the completed application.</p><p><a
class="sublink" href="http://www.sitepointstatic.com/examples/mockuptomasterpiece/Main.html">You can view my completed app here,</a> and if you&#8217;re interested in viewing the complete source of my project, you can <a
class="sublink" href="http://www.sitepointstatic.com/examples/mockuptomasterpiece/catalystLayout.fxp.zip">download my Flash Builder project here.</a></p><p><img
src="http://i2.sitepoint.com/graphics/1740_workinglist.thumb.png"  height="229" width="400" alt="The app is running!" /></p><h5>Designers and Developers, Together at Last</h5><p>Through both parts of this article we have demonstrated how to design a Flash application interface using Illustrator, and then convert the resulting Illustrator file into interactive Flash content using Flash Catalyst. Designers can now easily translate their design skills into interactive user interfaces and add functionality using Flash Builder. So, congratulations &#8211; you&#8217;ve just created a Flash masterpiece!</p><p><strong>Why not <a
class="sublink" href="http://www.sitepoint.com/quiz/adobe/flash-catalyst-flash-builder-2">test your knowledge of this article with our quiz?</a></strong></p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/flash-catalyst-flash-builder-2/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Flash Catalyst: Mockup to Masterpiece, Part I</title><link>http://www.sitepoint.com/flash-catalyst-flash-builder/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flash-catalyst-flash-builder</link> <comments>http://www.sitepoint.com/flash-catalyst-flash-builder/#comments</comments> <pubDate>Tue, 21 Jul 2009 14:00:00 +0000</pubDate> <dc:creator>Andrew Muller</dc:creator> <category><![CDATA[Flash]]></category> <guid
isPermaLink="false">http://blogs.sitepoint.com/?p=34844</guid> <description><![CDATA[Flash Catalyst is an amazing new tool from Adobe that reinvents the process of building Rich Internet Applications. In this tutorial, the first of two parts, Andrew demonstrates building a nifty music library app using Flash Catalyst, Flash Builder, and, well, very little code at all.]]></description> <content:encoded><![CDATA[<p></p><p><strong>Flash Catalyst, formerly codenamed Thermo, promises to make the process of converting an interface design to code a smooth and easy experience. In this tutorial, spread over two parts, Andrew Muller shows us how to build a nifty Flash application that retrieves music chart data from Yahoo!, using Illustrator, Flash Catalyst, and Flash Builder. Pay attention &#8211; <a
class="sublink" href="http://www.sitepoint.com/quiz/adobe/flash-catalyst-flash-builder/">there&#8217;s a quiz at the end!</a></strong></p><p>Note: To play along at home, you&#8217;ll need to grab the following:</p><p><ul><li><a
class="sublink" href="http://sitepointstatic.com/examples/mockuptomasterpiece/mockuptomasterpiece-design.ai.zip">Our sample design,</a> in Illustrator format</li><li>A copy of Illustrator CS4, if you&#8217;d like to edit the sample project</li><li><a
class="sublink" href="http://www.sitepoint.com/launch/db3d96">A copy of the Flash Catalyst beta</a></li><li>A copy of Flex Builder or Flash Builder &#8211; <a
class="sublink" href="http://www.sitepoint.com/launch/8c4440">grab a demo of Flash Builder here.</a></li></ul><h5>The Designer&#8217;s Dilemma</h5><p>Designers have a variety of tools they use on a regular basis to do their day job, often sticking to the one that they know best. Adobe&#8217;s Illustrator and Photoshop are two that dominate the software list of choice for interface designers of all stripes, whether they&#8217;re involved with site design, rich internet application (RIA) development, or any other kind of screen-based experience. Then, the design is handed over to a developer to convert into a working interface.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>A shortcoming of this design process is that, while it allows the designer to create a look for a web application, it&#8217;s impossible to see the feel or interactivity of an application until a developer has implemented it. The translation of that design is often imperfect, with designer and developer sometimes at odds over an object being a pixel out or the wrong color shade. How can we build stronger bridges between the two? Enter Flash Catalyst.</p><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><h5>Introducing Adobe Flash Catalyst</h5><p>Adobe has recently released the <a
class="sublink" href="http://labs.adobe.com/technologies/flashcatalyst/">first public beta of Flash Catalyst,</a> a new tool to help designers become more involved in the process of building RIA interactions. Designers can use Catalyst to build interactive interfaces for the Flash Player from work they&#8217;ve created in either Illustrator or Photoshop, with support for Fireworks slated to follow in a later release. Catalyst is capable of maintaining virtually all the characteristics of the original artwork; users can create interfaces in the applications with which they&#8217;re most comfortable, import them to Catalyst for more changes, then complete the round-trip back to the original design tool for further design alterations. Of course, since Catalyst is still in beta, there are some missing options that should come in later beta releases, but it still will give the user a good feel for what&#8217;s to come.</p><p>As well as converting artwork into a Flash interface, Catalyst includes tools to add interactive elements to the design. This initial release has the ability to convert objects into a limited but useful number of UI components, including data lists, buttons, and scrollbars, with extra UI controls available for wireframing interfaces directly in the Catalyst design view. Catalyst also includes tools for managing state and animated effects. Developers are likely to enjoy Catalyst because the designer can now turn objects into buttons before handing over the design, thus reducing a developer&#8217;s workload. It will also mean that there should be less possibility of designs being improperly applied to Flash applications, since all the visuals have been prepared in advance.</p><h5>Mocking Up the Interface in Illustrator</h5><p>We&#8217;re going to create a simple Flash application that will display information retrieved online via <a
class="sublink" href="http://developer.yahoo.com/yql/">Yahoo&#8217;s YQL (Yahoo Query Language) service.</a> For dynamic content we&#8217;ll use four YQL queries to retrieve a variety of music chart information. To help make this tutorial easier, we&#8217;ve decided to use example queries from the YQL site. <a
class="sublink" href="http://developer.yahoo.com/ypatterns/wireframes/">Yahoo also provides design stencils</a> that you can use to prototype your next RIA masterpiece; the tab stencils from the Yahoo design kit were part of the inspiration for the design of this application.</p><p>To begin, I&#8217;ve taken a vertical tab design out of the Yahoo stencil kit and imported that into Illustrator. The next task is to create the outline shape of the application &#8211; in this example I&#8217;ve used Illustrator&#8217;s drawing tools to design a box for that, with two rounded corners and a gradient fill to lift it up a bit. The app we&#8217;re building will be retrieving multiple rows of data from the YQL service as XML, so the next job is to define a way to display that repetitive data.  Depending on the type of data, the typical interface pattern is to display information in either rows or tiles &#8211; here I&#8217;ve used rows.</p><p>We&#8217;ll then need to create artwork to represent a single row of music chart data. The data that we&#8217;ll receive could include chart position, a URL for album cover artwork, a chart position shift indicator, and the names of the artist and track. Lastly, there&#8217;s a scrollbar, designed to match the curvy corners of the application.</p><p>Next, we&#8217;ll need to create artwork to represent the detail view state for the application. In Catalyst, we&#8217;re able to specify different states using different files or different layers within the file.  Catalyst also has a simple timeline, which may be used to control the timing of objects fading in and out as we switch between states.</p><p>With that done we&#8217;re ready to show the mockups to a client for feedback, finalize the design, and bring it into Catalyst for some interactivity! Here&#8217;s the mockup displaying both states of our app.</p><p><img
src="http://i2.sitepoint.com/graphics/1739_screenshot01.thumb.png"  height="462" width="400" alt="Our application mockup" /></p><p>Next, it&#8217;s time to start adding interactivity in Catalyst.</p><p><div
class="article-cms-pagebreak"></div></p><h5>Making the Design Interactive in Flash Catalyst</h5><p>Time to jump into Catalyst! Use the option to create a new project from an existing design file, and open the Illustrator file that we&#8217;ve created. It&#8217;ll take a moment or two to parse the file &#8211; naturally you should pay attention to the prompts for options like canvas size and editable regions, but in this example we&#8217;ll leave everything set at default.</p><p>Let&#8217;s begin with the track/artist chart display part of the design. We&#8217;ll convert this into a predefined Catalyst component called a <strong>Data List</strong>. Select any object in the design, and you&#8217;ll see a floating gray panel called the <strong>Heads Up Display</strong> (HUD) appear. This is used to create and manage interactive components.</p><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>The column of options on the right of the screen contains a series of panels that may be familiar if you&#8217;ve used Flash previously. In here you&#8217;ll find layers, library panels, and property panels as you normally would in Flash to manage various aspects of your content. As in Flash, the higher an object is in the <strong>Layers</strong> panel, the closer it is to the top of the stack of objects &#8211; that&#8217;s an important point to remember. The <strong>Layers</strong> panel is also a good way of quickly selecting specific objects, especially if they&#8217;re small or otherwise difficult to click on.</p><h5>Building the Data List</h5><p>The list is made up of repeated items with a scrollbar to move through the content. We&#8217;ll start by converting the scrollbar art into a working scrollbar. Select the elements that make up the scrollbar design. In our slider, we have a track, a thumb, and three small lines representing the thumb&#8217;s grip; we&#8217;ll select all these, and choose <strong>Convert Artwork to Component</strong> &gt; <strong>Vertical Scrollbar</strong> from the HUD. You might find that it&#8217;s easier to grab the items from the <strong>Layers</strong> panel, especially when they&#8217;re quite small, like the tiny texture on our scrollbar.</p><p><img
src="http://i2.sitepoint.com/graphics/1739_screenshot02.thumb.png"  height="300" width="400" alt="Converting scrollbar art to a component" /></p><p>Once converted, you should see a small yellow message in the HUD indicating that there are some component issues: this is because we still need to identify the individual parts that make up our scrollbar. Choose <strong>Edit Parts</strong> from the HUD, and select the track, then define it as the scrollbar&#8217;s <strong>Track</strong> from the <strong>Convert Artwork</strong> drop-down. Select the thumb image and the gripper artwork, and set them as the <strong>Thumb</strong> part from the same set of options.</p><p><img
src="http://i2.sitepoint.com/graphics/1739_screenshot03.thumb.png"  height="296" width="400" alt="Defining scrollbar parts" /></p><p>Now that we&#8217;re finished with the scrollbar, we&#8217;ll need to return to the main <strong>Design</strong> window to continue building the application. There&#8217;s a breadcrumb-like indicator at the top left of the design area listing which part of the application you&#8217;re in; click on the first item in the breadcrumb to return to the whole application.</p><p>The next component that we&#8217;ll use within the design is the repeated list item, representing how each row of information will look within our Data List. We&#8217;ll only need one of the rows that we created for the mockup, as this is all Catalyst requires to determine how the items should look, so we&#8217;ll delete the bottom three and just keep the first one. Then select all the graphics for that first row, <em>plus</em> the scrollbar component that we&#8217;ve just created, and use the HUD to convert the artwork to a Data List component.</p><p>Once again, a yellow message appears to indicate that there&#8217;s an issue with the component &#8211; we need to identify what element will form the repeated item. Select the artwork for the whole row, click <strong>Edit Parts</strong>, and define the row with the HUD to a <strong>Repeated Item</strong>. You should see that item will repeat down the window.</p><p>The size of the Data List affects what&#8217;s currently displayed, including the way that content will be cropped as you scroll up and down later on, so now&#8217;s the time to adjust the size of the data list to taste. Using the breadcrumbs above, double-check to see that you&#8217;re still within the Data List component, then use the drag handles to adjust the height of the list accordingly. We&#8217;ll extend the height of the Data List component to just inside the application itself; that way the list will appear to be masked by the application when it&#8217;s in use.</p><p><img
src="http://i2.sitepoint.com/graphics/1739_screenshot04.thumb.png"  height="236" width="400" alt="Defining a Data List" /></p><p><img
src="http://i2.sitepoint.com/graphics/1739_screenshot05.thumb.png"  height="311" width="400" alt="Adjusting the height of the list" /></p><p>Let&#8217;s see how that looks. From the <strong>File</strong> menu, select <strong>Run Project</strong>. Flex will begin building your application, and a new browser window will appear. If all went well, you should find that you can scroll up and down the Data List using your scrollbar.</p><p>The next step in our application is to start adding the interactions to the design &#8211; but you&#8217;ll have to stay tuned for the next part of this tutorial for that! In Part II, we&#8217;ll add more interaction, show you how to take your Catalyst project into Flash Builder, and populate the application using queries generated via Yahoo&#8217;s YQL service.</p><p>For now, save your project, and relax &#8211; we&#8217;ll see you in Part II!</p><p><strong>Think you have what it takes to be a Flash Catalyst guru? <a
class="sublink" href="http://www.sitepoint.com/quiz/adobe/flash-catalyst-flash-builder/">Prove it with our quick quiz!</a></strong></p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/flash-catalyst-flash-builder/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Building RIAs with the Adobe Flash Platform</title><link>http://www.sitepoint.com/rias-adobe-flash-platform-3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rias-adobe-flash-platform-3</link> <comments>http://www.sitepoint.com/rias-adobe-flash-platform-3/#comments</comments> <pubDate>Tue, 13 Jan 2009 14:00:00 +0000</pubDate> <dc:creator>Andrew Muller</dc:creator> <category><![CDATA[Flash]]></category> <guid
isPermaLink="false">http://blogs.sitepoint.com/?p=34814</guid> <description><![CDATA[In this article, Andrew explains some of the technologies that make up the Flash Platform, and how you can use them to build RIAs. The first 200 people to complete the quiz at the end will receive a free book!]]></description> <content:encoded><![CDATA[<p></p><p><strong><strong>The Flash that you thought you knew has changed. It&#8217;s grown up.</strong> </strong></p><p>In this article, I&#8217;ll explain some of the technologies that make up the Flash Platform, how they fit together, and how you can use them to build RIAs. Pay attention, because <a
class="sublink" href="http://www.sitepoint.com/quiz/adobe/building-rias-with-flash-platform/">there will be a quiz at the end!</a> The first 200 people to submit their answers will receive a copy of <em>The Adobe Flash Platform ActionScript Reference for Rich Internet Application Development</em> (that&#8217;s the print version) delivered to their door for free, thanks to Adobe.</strong></p><p>The transformation that Flash has undergone has been occurring for some time, and many developers are aware of it. Every day I hear of a developer building a powerful new application for the Flash runtime that performs tasks like connecting to enterprise solutions powered by SAP or Oracle &#8211; and all with the full blessing of those vendors. Flash has evolved beyond the <em>Skip Intro</em> button for which we used to hate it, and has become ubiquitous &#8211; helping the browser perform way beyond the text rendering that it was first built for.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>It was Macromedia (back in 2002, in their pre-Adobe acquisition days) who coined the term Rich Internet Application (RIA). The introduction of this term coincided with the release of a set of new custom components for Flash MX, thus supplying Flash developers with a set of UI components and providing them with a means to build their own. Flash already contained the ability to make a call to a remote server without forcing a page refresh, but with the release of ColdFusion MX that same year came Flash Remoting, which allowed applications built with Flash to pass serialized data to the server via AMF (Action Message Format).</p><p>These two products &#8211; custom components for Flash and Flash Remoting &#8211; and the synergy that could be experienced by combining them has since been expanded many times in the six-and-a-half years since they were first released. Recently, these technologies have been termed the Adobe Flash Platform. This umbrella term describes a collection of Adobe products, including multiple runtimes, development tools, and servers.</p><p><img
src="http://i2.sitepoint.com/graphics/1701-adobe-flashplatform-diagram.thumb.png"  height="281" width="400" alt="Adobe Flash Platform" /></p><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><h5>The Flash Runtime</h5><p>The Flash Player is the cornerstone of the Adobe Flash Platform; it offers the developer a single, cross-platform runtime with all the capabilities of the Internet today. It supports more than just vector animation &#8211; it&#8217;s also a multimedia player. In fact, the majority of all online video today is delivered via Flash, with the capacity to offer true High Definition video via the same H.264 codec used in Blu-ray.</p><p>The runtime can communicate with application servers via web services, HTTP, and remote object calls without the need to perform a browser refresh. Additionally, the player has had VoIP capacity for many generations, and it&#8217;s possible to build and deploy collaborative applications with Flash that can include text chat, whiteboarding, and the sharing of desktops across operating systems.</p><p>A lot of effort has been invested into making sure that Flash-based RIAs work successfully for the wide variety of devices and operating systems. For example, Adobe and Google together have recently announced <a
class="sublink" href="http://googleblog.blogspot.com/2008/06/google-learns-to-crawl-flash.html">the successful implementation and development of a virtual user that Google uses to retrieve text from Flash content</a>; this enables the content to appear in Google&#8217;s search results. Adobe is constantly improving the performance of accessibility within the Flash Player and its compatibility with screen readers for the visually impaired. Deep linking and browser history compatibility are features present in the open source Flex framework for Flash applications; these aim to eliminate the kind of navigation problems encountered with dynamic content in Ajax-based RIAs.</p><p>Adobe has successfully matured the Flash runtime in the short time that they&#8217;ve had it as a product. With each iteration, particularly Players 9 and 10, significant improvements in performance have occurred; Player 10 now offers hardware acceleration for advanced graphical effects. Flash Player 10 also introduces new functionality, including 3D effects, custom filters and effects, advanced text support, and dynamic streaming for improved video performance.</p><p>Flash Player 10 is the latest version of the browser plugin; it&#8217;s available for Windows, OS X, Linux, and Solaris. Flash Lite 3 is a scaled-down version of the runtime for use on mobile and handheld devices.</p><p><div
class="article-cms-pagebreak"></div></p><h5>Look &#8211; up in the AIR!</h5><p>And then there&#8217;s Adobe AIR &#8211; a new category of runtime that combines Flash Player 10 and WebKit (the web page rendering engine behind Safari and Chrome) into a stand-alone runtime capable of running offline applications. The runtime is available for Windows, OS X, and Linux.</p><p>Adobe AIR was introduced by Adobe mid-2008 after a lengthy public beta cycle. Developers can use their web application building skills to create apps for the desktop and deploy them via AIR. The AIR runtime incorporates functionality missing from the browser, such as access to the file system to create, delete, and maintain files and folders.</p><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>Adobe AIR supports drag and drop interaction with the operating system, network connection detection, and SQLite for local storage of data; the latter can be easily searched with standard SQL queries. If Acrobat Reader is installed on the client machine, AIR will utilize that software package&#8217;s capabilities for rendering PDFs. A version of the AIR runtime for mobile and handheld devices has been hinted at by Adobe, although there&#8217;s yet to be a release date announced.</p><p>Of course, <a
class="sublink" href="http://www.sitepoint.com/launch/airsdk">all of these tools are free to download</a>, and Flash Player is bundled as part of a Windows and OS X distribution.</p><h5>Development Tools for RIAs</h5><p>Flash CS4 Professional is the latest iteration of the Flash authoring environment. Originally an animation tool, the Flash IDE can also be used to program Flash movies using <a
class="sublink" href="http://www.adobe.com/devnet/actionscript/">ActionScript</a>, an <a
class="sublink" href="http://en.wikipedia.org/wiki/ECMAScript">ECMAScript</a>-based object oriented programming language. It has the necessary tools for ActionScript authoring, including an ActionScript editor and an advanced debugger. Flash CS4 is both a tool for designers and developers, and while it&#8217;s possible to create whole applications with Flash, Adobe has created a framework for Flash applications called Flex (check out some of the <a
class="sublink" href="http://www.sitepoint.com/subcat/flash/">Flex tutorials on sitepoint.com</a>).</p><p>Originally released as an enterprise platform (with an enterprise price to match), Flex is now a free, open source framework for building applications to run within the Flash runtime. Flex applications are authored in a combination of two languages:</p><p>MXML, a declarative XML-based language in which tags represent classes within the framework; it&#8217;s principally used for UI layouts and behaviors, and ActionScript 3, an object-oriented language typically used for client logic. Developers with a Java background will find ActionScript intuitive and may be tempted to author with it entirely.</p><p>The Flex framework contains over 100 extensible UI components. <a
class="sublink broken_link" href="http://www.adobe.com/products/flex/flexdownloads/index.html">It can be downloaded for free as part of the free Flex 3 SDK</a>, which also contains a stand-alone compiler.</p><p><img
src="http://i2.sitepoint.com/graphics/1701-flashplatform-flex-builder.thumb.png"  height="300" width="400" alt="Flex Builder" /></p><p>A number of open source frameworks have emerged to assist Flex application development. The most popular of these is <a
class="sublink broken_link" href="http://www.adobe.com/products/flex/flexdownloads/index.html">Cairngorm</a>, an open source project managed by Adobe. Others worth looking at include <a
class="sublink" href="http://mate.asfusion.com/">Mate</a>, a tag-based, event-driven framework; and <a
class="sublink" href="http://puremvc.org/">PureMVC</a>, a lightweight ActionScript 3 framework for creating applications based on the model-view-controller concept.</p><p>While the Flex framework and Flex SDK are free, the Flex development tool, Flex Builder, is a commercial product (<a
class="sublink" href="https://freeriatools.adobe.com/flex/">although it&#8217;s free for educational use</a>). Flex Builder 3 is an Eclipse-based IDE, and is available as either a stand-alone application or as a plugin for Eclipse. There are versions of Flex Builder for both Windows and OS X, and a beta version is available for Linux.</p><p>Flex Builder supports the editing of MXML, ActionScript, and CSS files, including code completion, tag insight, and syntax coloring. It also includes a visual layout tool, to facilitate the positioning of components in a WYSIWYG environment.</p><p><a
class="sublink" href="http://www.adobe.com/products/flex/buy/">Flex Builder is available in two editions, Standard and Professional</a>. The Professional edition includes a charting library, performance profiling tools, and support for automated functional testing. Projects built with Flex Builder can be deployed either in the browser via the Flash Player, or as stand-alone applications via Adobe AIR.</p><h5>Servers</h5><p>A Flash application is able to retrieve data from a remote server via HTTP calls; this can be done with either of the Adobe tools mentioned above. With Flash MX, Macromedia introduced a once proprietary binary data transfer format for communication with an application server called Action Message Format (AMF); this has recently been made open source. AMF borrowed the means to describe the structure of data from the <a
class="sublink" href="http://en.wikipedia.org/wiki/Simple_Object_Access_Protocol">SOAP protocol</a>; automatic translation of this format was provided with the Flash Remoting classes and service that was included in ColdFusion. AMF has also been reverse-engineered and is available for a number of application servers; <a
class="sublink" href="http://www.amfphp.org/">AMFPHP</a>, <a
class="sublink" href="http://www.themidnightcoders.com/products/weborb-for-php/overview.html">WebORB</a>, and <a
class="sublink" href="http://code.google.com/p/rubyamf/">RubyAMF</a> are examples of that reverse-engineering.</p><p>Adobe now also have an open source, Java remoting and web messaging technology that Flex and Adobe AIR applications can use to connect to Java server logic called <a
class="sublink" href="http://opensource.adobe.com/wiki/display/blazeds/BlazeDS/">BlazeDS</a>. This uses the same AMF protocol mentioned above. BlazeDS integration has recently been added to the Spring framework to make Spring-powered RIAs with Flex front ends possible.</p><p>Adobe have additional server products that also support AMF; ColdFusion has been previously mentioned, while another is <a
class="sublink" href="http://www.adobe.com/products/livecycle/dataservices/">LiveCycle Data Services</a>, which also includes Flex Messaging for real-time data push and <a
class="sublink" href="http://en.wikipedia.org/wiki/Publish/subscribe">publish/subscribe messaging</a>.</p><p>The Adobe Flash Media Server group of products are also included within the Flash Platform. The Flash Media Interactive Server can be used to build Flash-based collaborative applications, which can include features like streaming Flash video, VoIP, chat, webcam chat, and online gaming. The Flash Streaming Media Server is capable of streaming both live and on-demand Flash video.</p><p><div
class="article-cms-pagebreak"></div></p><h5>The Near Future</h5><p>Adobe&#8217;s long-awaited technology preview, Thermo, was released to attendees at Adobe MAX in November 2008 under the new name, <a
class="sublink" href="http://labs.adobe.com/technologies/flashcatalyst/">Flash Catalyst</a>. This is an interaction design tool for RIAs that will be released as a public beta in the first half of this year. Flash Catalyst will import design comps created in Illustrator, Photoshop, or Fireworks, making use of a new interchange format introduced with all the CS4 design tools called FXG.</p><p><img
src="http://i2.sitepoint.com/graphics/1701-flashplatform-flash-catalyst.thumb.png"  height="264" width="400" alt="Flash Catalyst" /></p><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>Flash Catalyst can convert the design elements in the artwork into design and interactive elements for an RIA project with workflow; this gives it the ability for an interactive element like a scrollbar to go back to Illustrator for some design tweaks to occur. Flash Catalyst converts elements like buttons or scrollbars into Flex custom components. Interactions and timeline events are added visually to projects in Flash Catalyst, but in reality the application is creating the whole project as MXML. Under the hood, Flash Catalyst is another Eclipse-based application just like Flex Builder.</p><p>Flash Catalyst is already listed as a part of the Flash Platform; the MXML that it produces is incompatible with Flex 3, but will be compatible with the next version, Flex 4 (code-named Gumbo), which is in public beta. Flex 4 has graphical enhancements including an implementation of FXG, and customizable components.</p><p><img
src="http://i2.sitepoint.com/graphics/1701-flashplatform-flash-catalyst-detail.thumb.png"  height="512" width="400" alt="Flash Catalyst in Detail" /></p><p>Another new project related to Flash that was released at Adobe&#8217;s annual developer conference MAX late last year was <a
class="sublink" href="http://labs.adobe.com/technologies/alchemy/">Alchemy</a>; this is a research project that allows users to compile C and C++ code to run on Flash Player 10. There were quite a few good examples of how additional functionality could be added to Flash-based applications using existing libraries, including encryption, support for RAW digital photographs, and PDF creation.</p><h5>Conclusion</h5><p>Adobe&#8217;s Flash Platform offers the RIA developer a powerful, ubiquitous runtime in the Flash Player; within the browser it&#8217;s a case of code once, deploy everywhere, as there&#8217;s a version of the runtime for all major operating systems. The Flex open source framework gives developers the ability to build rich interactive applications to run in both the browser and on the desktop via Adobe AIR; it provides the ability to connect to data through a number of different connection types.</p><p>If you&#8217;re building a Rich Internet Application, and haven&#8217;t checked out the technologies that comprise the Adobe Flash Platform, then now is a good time to start. We&#8217;ll be publishing more articles on these topics over the coming months on sitepoint.com, so stay tuned!</p><p><strong>In the mean time, test yourself on the contents of this article by <a
class="sublink" href="http://www.sitepoint.com/quiz/adobe/building-rias-with-flash-platform">taking the quiz</a>. The first 200 people to submit their answers will receive a print copy of <em>The Adobe Flash Platform ActionScript Reference for Rich Internet Application Development</em>, delivered to their door for free, courtesy of Adobe. <a
class="sublink" href="http://www.sitepoint.com/quiz/adobe/building-rias-with-flash-platform">Take the quiz now!</a></strong></p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/rias-adobe-flash-platform-3/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Google’s Flash Indexing Disaster</title><link>http://www.sitepoint.com/google%e2%80%99s-flash-indexing-disaster/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=google%25e2%2580%2599s-flash-indexing-disaster</link> <comments>http://www.sitepoint.com/google%e2%80%99s-flash-indexing-disaster/#comments</comments> <pubDate>Wed, 16 Jul 2008 04:58:24 +0000</pubDate> <dc:creator>Kevin Yank</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Search Engine Marketing]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/blogs/?p=2654</guid> <description><![CDATA[On July 1st, Google announced that, using technology provided by Adobe, it had enhanced the Google Search Engine to index the text embedded within Flash movies. What followed was bad advice from Google, second-guessing by web developers, and finally a few straight answers.]]></description> <content:encoded><![CDATA[<p></p><p><strong>On July 1st, Google <a
href="http://googlewebmastercentral.blogspot.com/2008/06/improved-flash-indexing.html">announced</a> that, using <a
href="http://www.adobe.com/devnet/flashplayer/articles/swf_searchability.html">technology</a> provided by Adobe, it had enhanced the Google Search Engine to index the text embedded within Flash movies. What followed was bad advice from Google, second-guessing by web developers, and finally a few straight answers.</strong></p><p>Google&#8217;s initial announcement was so incredibly vague as to render it all but useless. Developers came away knowing that Google was doing <em>something</em> different with their Flash content, but that&#8217;s about it.</p><p>While Google&#8217;s <a
href="http://almaer.com/blog/flash-indexing-and-seo-remember-testing">Dion Almaer suggested</a> that search engines have always been black boxes and that it was up to us to discover what had changed through testing, just about everyone else was crying foul.</p><p>Google&#8217;s credibility was immediately in question due to the obviously bad advice it contained:</p><blockquote><p> &quot;If you prefer Google to ignore your less informative content, such as a &quot;copyright&quot; or &quot;loading&quot; message, consider replacing the text within an image, which will make it effectively invisible to us.&quot;<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p></blockquote><p>For the record, replacing fast-loading, accessible text content with a bulky image simply to hide it from search engines is <em>never</em> a good idea.</p><p>Google&#8217;s list of caveats in the announcement were similarly perplexing:</p><blockquote><p> &quot;Googlebot does not execute some types of JavaScript. So if your web page loads a Flash file via JavaScript, Google may not be aware of that Flash file, in which case it will not be indexed.&quot;</p></blockquote><p><em>What</em> types of JavaScript? Established best practice for publishing Flash content is to use the <a
href="http://code.google.com/p/swfobject/">SWFObject JavaScript library</a> to overcome bugs in older browsers, so was Google saying that it would only index Flash content that was authored using broken/outdated HTML-only techniques?</p><blockquote><p> &quot;We currently do not attach content from external resources that are loaded by your Flash files. If your Flash file loads an HTML file, an XML file, another SWF file, etc., Google will separately index that resource, but it will not yet be considered to be part of the content in your Flash file.&quot;</p></blockquote><p>Any experienced Flash developer knows that if you are going to have any significant amount of text in your Flash content, your best bet is to stick it in an XML file and load it on the fly, so you don&#8217;t have to rebuild your Flash movie whenever you change the content.</p><p>Apparently, not only will Google not see Flash content authored this way, but it will track down the XML file anyway and index it as a <em>separate page</em> on your site! That&#8217;s right, Google will helpfully direct people searching for your content to the raw XML file that contains it, rather than your slick, Flash front-end.</p><p>All this stuff made so little sense, that many developers questioned whether Google was actually able to index <em>any</em> Flash content of consequence. Within a few days, however, the Search Engine War blog was able to verify that Google <a
href="http://www.search-engine-war.co.uk/2008/07/flash-time-to-c.html">was indeed indexing Flash content</a>.</p><p>Finally, after several days of developer outcry, Google admitted it had left too many questions unanswered, and four days later, it posted a <a
href="http://googlewebmastercentral.blogspot.com/2008/06/improved-flash-indexing.html">significant update</a> that is well worth reading if you have any Flash content on your site.</p><p>Here&#8217;s a quick summary of what we now know:</p><ul><li> The July 1st release didn&#8217;t index Flash content inserted with the <a
href="http://code.google.com/p/swfobject/">SWFObject library</a>&#8216;s dynamic publishing method, which writes the Flash content into the page entirely with JavaScript. The recommended static publishing method (where two nested <code>&lt;object&gt;</code> tags are included in the page) <em>was</em> indexed. Google is now deploying an update that supports the dynamic publishing method as well.<br
/>&#160;</li><li> Text content loaded on-the-fly from an XML file is not yet indexed, but Google is working on fixing this in the near term.<br
/>&#160;</li><li> Google will do its best to detect when duplicate content is there to provide an HTML alternative to Flash content, and will only display one of the two versions in the search results. No penalty is applied to a site&#8217;s search ranking due to duplicate content.</li></ul><p>There are still unknowns here, but that will always be the case with the Google search engine. Though it took a few days, Google is answering what questions it can, and responding to developer concerns with enhancements.</p><p>Before very long, most of the text within Flash-based web sites will make its way into the Google search index. Nevertheless, uncertainty will remain over how deeply Google is able to probe Flash content for a while yet. Providing non-Flash alternative content will remain an effective means of guaranteeing your most important content a place in the Google index. It also gives users of non-Flash-enabled browsers (like the iPhone) something to look at.</p><p>Though Google&#8217;s initial message was pretty half-baked, the follow-up has put most of my concerns to rest. How about yours?</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/google%e2%80%99s-flash-indexing-disaster/feed/</wfw:commentRss> <slash:comments>21</slash:comments> </item> <item><title>Open Screen Project aims to put Flash everywhere</title><link>http://www.sitepoint.com/open-screen-project-aims-to-put-flash-everywhere/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=open-screen-project-aims-to-put-flash-everywhere</link> <comments>http://www.sitepoint.com/open-screen-project-aims-to-put-flash-everywhere/#comments</comments> <pubDate>Thu, 01 May 2008 05:15:15 +0000</pubDate> <dc:creator>Kay Smoljak</dc:creator> <category><![CDATA[Flash]]></category> <guid
isPermaLink="false">http://www.sitepoint.com/blogs/?p=2456</guid> <description><![CDATA[Today Adobe announced the Open Screen Project which aims to bring the Flash player to as many different devices as possible. Cutting through the jargon on the press release, the most significant points are that Adobe are removing restrictions on usage of the Flash and Flash video specifications (SWF, FLV, and F4V), publishing the device [...]]]></description> <content:encoded><![CDATA[<p></p><p>Today Adobe announced the <a
href="http://www.adobe.com/openscreenproject/">Open Screen Project</a> which aims to bring the Flash player to as many different devices as possible.</p><p>Cutting through the jargon on the press release, the most significant points are that Adobe are removing restrictions on usage of the Flash and Flash video specifications (SWF, FLV, and F4V), publishing the device porting layer APIs, and removing the licensing fees for the next major version of the Flash Player and AIR for devices. Which means that developers will now be able to port Flash to any device, and distribute and deploy it for free. Additionally, the Flash Cast and AMF data transfer protocols will be published.</p><p>While Flash Player has long been an almost ubiquitous platform for desktop PCs, this new move aims to do the same for phones and portable devices. <a
href="http://blog.digitalbackcountry.com/?p=1404">Ryan Stewart</a> and <a
href="http://blogs.adobe.com/open/2008/04/the_open_screen_project.html">Dave McAllister</a> from Adobe have both written blog posts on the announcement.</p><p>Essentially, the Flash player is now about as open as it can possibly be without being open source. It&#8217;s an interesting move by Adobe, and I&#8217;m sure many will be watching to see what comes out of it.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/open-screen-project-aims-to-put-flash-everywhere/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>ObjectSwap: Bypassing the ActiveX Activation Issue in IE</title><link>http://www.sitepoint.com/activex-activation-issue-ie/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=activex-activation-issue-ie</link> <comments>http://www.sitepoint.com/activex-activation-issue-ie/#comments</comments> <pubDate>Tue, 06 Jun 2006 14:00:00 +0000</pubDate> <dc:creator>Karina Steffens</dc:creator> <category><![CDATA[Flash]]></category> <guid
isPermaLink="false">http://blogs.sitepoint.com/?p=34658</guid> <description><![CDATA[The patent law suit by EOLAS against Microsoft, and the way ActiveX objects are handled in Internet Explorer, has created no end of problems for web developers. In this article, Karina presents a simple solution that works in IE and doesn't affect the way ActiveX works in other browsers.]]></description> <content:encoded><![CDATA[<p></p><p><strong>Microsoft&#8217;s recent decision to change the way ActiveX objects are handled in Internet Explorer, following the patent law suit by EOLAS, has created a serious problem for the developer community.</strong></p><p>All ActiveX controls in Internet Explorer &#8212; including Flash and Shockwave &#8212; will need to be activated by a mouse click (or by hitting Tab and the Enter key) before the user can interact with the control. This is bound to impair the user experience of any web site that embeds Flash, and it&#8217;s up to the Flash and HTML developers to clean up the mess.</p><h5>Available Solutions</h5><p>You can bypass the activation requirement by using an externally linked script, such as JavaScript, to embed the ActiveX content. Solutions are currently available for Flash, such as <a
class="sublink broken_link" href="http://blog.deconcept.com/flashobject">FlashObject</a> and <a
class="sublink" href="http://www.bobbyvandersluis.com/ufo">UFO</a>.</p><p>These work well for embedding new Flash content using JavaScript. But what about existing object tags, which will need to be rewritten, or browsers with JavaScript disabled? These situations require an alternative solution.</p><h5>ObjectSwap</h5><p>The ObjectSwap solution presented in this article takes all these issues into account. It captures all existing object tags and replaces them with &#8230; themselves. This forces an automatic activation in Internet Explorer, while leaving other browsers alone. <a
class="sublink" href="http://www.unfocus.com/projects/PatentMagic">Similar solutions</a> have been developed in parallel, but this article will concern itself only with ObjectSwap.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>Although this solution was developed primarily with Flash in mind, it should also work with other ActiveX controls, such as Shockwave. The script affects all the object tags in the page, but the developer can choose to exclude a specific object by setting its class name to &quot;noswap&quot;.</p><p><strong><em>Implementation</em></strong></p><p>ObjectSwap was written with a view to make implementation as easy as possible, with minimum disruption to existing code. The only change you need to make to your HTML page is to link the script in the <code>&lt;head&gt;</code> tag for every page that includes ActiveX objects, like this:</p><pre><code>&lt;script type=&quot;text/javascript&quot; src=&quot;objectSwap.js&quot;&gt; &lt;/script&gt;</code></pre><p>Once you&#8217;ve done that, you can keep on using your favourite technique for embedding ActiveX content. For Flash, that means either the Adobe/Macromedia default setting using object/embed tags, or the standards-compliant technique that uses only the object tag (better known as <a
class="sublink" href="http://www.alistapart.com/articles/flashsatay">Flash Satay</a>).</p><p><strong><em>Flash Detection</em></strong></p><p>So far, so good. But since we&#8217;re already using JavaScript, why not avail ourselves of the opportunity to add some Flash Detection to the mix? We can achieve this by adding a new param definition to the Flash object, for example:</p><pre><code>&lt;param name=&quot;flashVersion&quot; value=&quot;7&quot; /&gt; </code></pre><div
id="adz" class="vertical"><script type="text/javascript">GA_googleFillSlot("Articles_6_300x250");</script></div><p>The script looks for this <code>param</code> and, if it exists, will transform the object into a <code>div</code> that displays the alternative content. This content is not generated by the script, but instead must already reside inside the object tag, and display alternative text, images, links to the Flash installer, and so forth. Internet Explorer normally ignores this content if Flash is present. This is also true for other browsers when you use the Flash Satay method, so you can simply add the content anywhere in the body of the object.</p><p>On the other hand, if the object/embed method is used, gecko-based browsers like Firefox and Netscape will display the alternative content alongside the embedded movie. The solution is to enclose the content within HTML comments, which will be stripped by the script when the content is displayed. There should be a space or a line-break between the comment tags and content, to avoid conflicts with any IE conditional comments that happen to be inside the object tag:</p><pre><code>&lt;!-- &nbsp; <br />
&lt;p&gt;You need &lt;a href= &quot;http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&quot;&gt;Flash&lt;/a&gt; to view this content.&lt;/p&gt; <br />
--&gt;</code></pre><p>Of course, you can also choose to ignore the Flash detection option, or use Adobe&#8217;s express installation for Flash 8 instead.</p><p><strong><em>Browser Support</em></strong></p><p>The activation issue of ActiveX objects affects only Internet Explorer, so most of the code will also affect only IE. However, the Flash detection code needs to work with other browsers as well. This means that the objectSwap function will be called for all browsers to perform the Flash detection service, if required, but will only execute the object swap on IE, leaving other browsers unaffected. <br
/> This is all you need to know to start using the script. You can <a
class="sublink" href="http://www.sitepoint.com/examples/objectswap/objectswap.zip">download the script and examples here</a>.</p><p>However, if you&#8217;d like to know more about how ObjectSwap works, the following sections will reveal the inner workings of the script.</p><h5>How It Works</h5><p>First, the script cycles through all the object tags in the HTML source code and retrieves their outerHTML values:</p><pre><code>var objects = document.getElementsByTagName('object'); <br />
for (var i=0; i&lt;objects.length; i++) { <br />
 &nbsp;var o = objects[i]; <br />
 &nbsp;var h = o.outerHTML; </code></pre><p>Since Internet Explorer does not include any of the object&#8217;s <code>param</code> tags in its <code>outerHTML</code> (or <code>innerHTML</code>), they need to be extracted separately into a string:</p><pre><code>var params = &quot;&quot;; <br />
for (var j = 0; j&lt;o.childNodes.length; j++) { <br />
 &nbsp;var p = o.childNodes[j]; <br />
 &nbsp;if (p.tagName == &quot;PARAM&quot;){ <br />
 <br />
 &nbsp; &nbsp; .... <br />
 <br />
 &nbsp; &nbsp;params += p.outerHTML; <br />
 &nbsp;} <br />
}</code></pre><p>The generated <code>&quot;params&quot;</code> string is spliced into the <code>outerHTML</code> code:</p><pre><code>var tag = h.split(&quot;&gt;&quot;)[0] + &quot;&gt;&quot;; <br />
var newObject = tag + params + o.innerHTML + &quot; &lt;/OBJECT&gt;&quot;;</code></pre><p>And, finally, the new generated HTML replaces the original:</p><pre><code>o.outerHTML = newObject; </code></pre><p><strong><em>Hiding the Objects</em></strong></p><p>There are still a few things to be done. First of all, we want to prevent the objects from loading twice &#8212; once when they&#8217;re initiated in the HTML code, and again after they&#8217;re swapped. We achieve this by writing a new style sheet to the document before the page loads. The style uses display: none to take the objects out of the document flow, delaying their loading until the swap is complete:</p><pre><code>document.write (&quot;&lt;style id='hideObject'&gt; object {display: none;} &lt;/style&gt;&quot;);</code></pre><p>After the swap, the style is disabled and the objects are allowed to load:</p><pre><code>document.getElementById(&quot;hideObject&quot;).disabled = true;</code></pre><p><strong><em>Detecting Flash</em></strong></p><p>As it cycles through the parameter list for each object, the <code>objectSwap</code> function checks for the existence of the <code>flashVersion</code> param and, if it&#8217;s found, executes a Flash detection method:</p><pre><code>if (p.name == &quot;flashVersion&quot;) { <br />
 &nbsp;hasFlash = detectFlash(p.value);</code></pre><p>The method looks for Flash in two types of browsers. First, it checks whether the plugin is present in the <code>navigator.plugins</code> array, which applies to gecko-based browsers:</p><pre><code>detectFlash = function(version) { <br />
 &nbsp;if(navigator.plugins &amp;&amp; navigator.plugins.length){ <br />
 &nbsp; &nbsp;var plugin = navigator.plugins[&quot;Shockwave Flash&quot;]; <br />
 &nbsp; &nbsp;if (plugin == undefined){ <br />
 &nbsp; &nbsp; &nbsp;return false; <br />
 &nbsp; &nbsp;}</code></pre><p>If a plugin is found, the code still needs to check for the installed version. This is achieved by retrieving the third item in the plugin&#8217;s description property and checking it against the passed version parameter:</p><pre><code>var ver = navigator.plugins[&quot;Shockwave Flash&quot;].description.split(&quot; &quot;)[2]; <br />
 &nbsp;return (Number(ver) &gt;= Number(version))</code></pre><p>Next, the script checks for the plugin in Internet Explorer. In JavaScript, it achieves this by trying to create a new Flash ActiveX object with the passed version. If JavaScript is unable to create the object, it will throw an exception, which is why the entire expression must be enclosed inside a try-catch block:</p><pre><code>} else if (ie &amp;&amp; typeof (ActiveXObject) == &quot;function&quot;) {  &nbsp; <br />
 &nbsp;try { <br />
 &nbsp; &nbsp;var flash = new ActiveXObject(&quot;ShockwaveFlash.ShockwaveFlash.&quot; + version); <br />
 &nbsp; &nbsp;return true; <br />
 &nbsp;} <br />
 &nbsp;catch(e) { <br />
 &nbsp; &nbsp;return false; <br />
 &nbsp;} <br />
}</code></pre><p>Just in case some other browser has a different way of handling Flash, the method returns true at its end, as a safety net. If the browser doesn&#8217;t have the navigator.plugins array, and is not Internet Explorer, it will still try to display the Flash movie.</p><p>Back at the <code>objectSwap</code> method, if the script doesn&#8217;t find the correct version, the object&#8217;s id is retrieved (or a new one is assigned) and added to a queue:</p><pre><code>if (!hasFlash){ <br />
o.id = (o.id == &quot;&quot;) ? (&quot;stripFlash&quot;+i) : o.id; <br />
stripQueue.push(o.id); <br />
Later on, the queue is passed to the stripFlash method: <br />
if (stripQueue.length) { <br />
 &nbsp;stripFlash(stripQueue) <br />
}</code></pre><p><strong><em>Stripping Flash</em></strong></p><p>This method cycles through the ids in the queue and retrieves each object&#8217;s <code>innerHTML</code>:</p><pre><code>for (var i=0; i&lt;stripQueue.length; i++){ <br />
 &nbsp;var o = document.getElementById(stripQueue[i]); <br />
 &nbsp;var newHTML = o.innerHTML;</code></pre><p>For the object/embed method, where the alternative content has been hidden from Firefox and Netscape with comments, regular expressions are needed to strip the comments from the <code>innerHTML</code>, so that the new content can be displayed in the browser:</p><pre><code>newHTML = newHTML.replace(/&lt;!--\s/g, &quot;&quot;); <br />
newHTML = newHTML.replace(/\s--&gt;/g, &quot;&quot;);</code></pre><p>Another regular expression is used to neutralise the embed tag by replacing it with a <code>span</code>:</p><pre><code>newHTML = newHTML.replace(/&lt;embed/gi, &quot;span&quot;);</code></pre><p>In order to transform the object into a div, the easiest thing would have been to change the object&#8217;s <code>outerHTML</code>. However, that doesn&#8217;t work in Firefox; instead, a new <code>div</code> element is created and assigned the same <code>innerHTML</code>, <code>id</code>, and <code>className</code> as the object:</p><pre><code>var d = document.createElement(&quot;div&quot;); <br />
d.innerHTML = newHTML; <br />
d.className = o.className; <br />
d.id = o.id;</code></pre><p>Finally, the object is swapped for the new <code>div</code>:</p><pre><code>o.parentNode.replaceChild(d, o);</code></pre><p><strong><em>Initiating the <code>ObjectSwap</code></em></strong></p><pre><code>ObjectSwap</code> must be executed after all the objects have loaded, by binding the <code>objectSwap</code> function to the <code>window.onload</code> event. The catch is that other linked scripts in your page might have their functions bound to the same event; the last script to do so will override all the earlier bindings, causing the other scripts to fail. This is resolved by catching existing functions bound to the event, and calling them as well:
<pre><code>var tempFunc = window.onload; <br />
window.onload = function(){ <br />
 &nbsp;if (typeof (tempFunc) == &quot;function&quot;){ <br />
 &nbsp; &nbsp;try{ <br />
 &nbsp; &nbsp; &nbsp;tempFunc(); <br />
 &nbsp; &nbsp;} catch(e){} <br />
 &nbsp;} <br />
 &nbsp;objectSwap(); <br />
}</code></pre><p>Naturally, this will fail if following scripts use <code>window.onload</code>, so you must ensure that either this script comes last, or that the following scripts use a similar technique.</p><h5>Conclusion</h5> <pre><code>ObjectSwap</code> offers a complete, one-step solution to the problem resulting from the decision by Microsoft as a result of the EOLAS law suit. A single JavaScript file linked from the <code>&lt;head&gt;</code> tag of your page is all you need to avoid Internet Explorer's activation requirement. What's more, you can take advantage of the situation and enhance the user experience by adding some simple Flash detection to your page.</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/activex-activation-issue-ie/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 41/127 queries in 0.171 seconds using memcached
Object Caching 2066/2265 objects using memcached

Served from: www.sitepoint.com @ 2012-05-27 10:07:15 -->
