<?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"
	>

<channel>
	<title>hubflanger.com &#124; adventures in code</title>
	<atom:link href="http://hubflanger.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hubflanger.com</link>
	<description>Peng's blog about Flash, Flex, Actionscript, RIA development and programming</description>
	<pubDate>Wed, 16 Apr 2008 00:09:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Building a Flash site using PureMVC</title>
		<link>http://hubflanger.com/building-a-flash-site-using-puremvc/</link>
		<comments>http://hubflanger.com/building-a-flash-site-using-puremvc/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 03:55:44 +0000</pubDate>
		<dc:creator>Peng</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[PureMVC]]></category>

		<guid isPermaLink="false">http://hubflanger.com/?p=37</guid>
		<description><![CDATA[At a recent FlashCodersNY meeting where the discussion centered around the subject of the MVC (Model-View-Controller) design pattern, it struck me that a lot of Flash developers, especially those coming from design backgrounds, did not see the value in using the MVC design pattern.
Well, I&#8217;m not here to make the case for using MVC but [...]]]></description>
			<content:encoded><![CDATA[<p>At a recent <a href="http://flashcodersny.org" target="_blank">FlashCodersNY</a> meeting where the discussion centered around the subject of the MVC (Model-View-Controller) design pattern, it struck me that a lot of Flash developers, especially those coming from design backgrounds, did not see the value in using the MVC design pattern.</p>
<p>Well, I&#8217;m not here to make the case for using MVC but if you have spent enough time struggling with structuring an application so that it&#8217;s clearly represented by a set of well-defined relationships and responsibilities, you would&#8217;ve likely tried to implement some kind of MVC pattern. Now, some design pattern is certainly better none. Trouble is, every developer has his or her own approach to MVC. When a team of developers are working on the same project, things can get confusing pretty quickly if there are no common standards to adhere to. <span id="more-37"></span></p>
<p>This brings us to the <a href="http://puremvc.org" target="_blank">PureMVC</a> framework. Created by Cliff Hall, this framework provides a set of well-defined protocols for implementing the MVC design pattern with your application, rendering the grunt work of manually hooking up an MCV structure a thing of the past. However, great as <a href="http://puremvc.org" target="_blank">PureMVC</a> may be, it does not present an easy learning curve for some, especially those who are just getting started with OOP and design patterns.</p>
<p>In this tutorial, I will show you how to build a Flash site using PureMVC. If you&#8217;re familiar with the Flash IDE and have some experience with OOP and writing classes, you&#8217;re pretty much ready to go. </p>
<h3>1. Download Source Code</h3>
<p>Download the source files for this tutorial <a href="/assets/puremvc_tutorial_src.zip">here</a>.</p>
<h3>2. Creating the Flash assets</h3>
<p>Open <code>fla/PureMVCSite.fla</code> in the Flash IDE. In the Library Panel, you&#8217;ll see that I have created various assets for our Flash site: </p>
<ul>
<li>A <code>site</code> movieclip that serves as a container clip with the UI elements laid out in the desired fashion</li>
<li>A <code>header</code> movieclip containing  a dynamic textfield for the site header</li>
<li>A <code>nav</code> movieclip containing 3 <code>navButton</code> instances
</li>
<li>A <code>body</code> movieclip containing a dynamic multiline textfield for the body content</li>
</ul>
<p>The <code>site</code> movieclip symbol is linked to the class <code>Site</code>. The <code>nav</code> movieclip symbol is linked to the class <code>MainNav</code>. Both these classes belong to the package <code>com.hubflanger.puremvc.view.component</code>. In the PureMVC world, these are known as &#8220;view components&#8221;, not to be confused with the built-in Flash components. These components communicate with the PureMVC framework via their associated <em>Mediators</em>, allowing them to be &#8220;loosely-coupled&#8221;, thereby granting you great flexibility in changing their behavior without impacting the rest of your application.</p>
<p>In the <strong>ActionScript 3.0 Setting</strong> of the <strong>Publish Settings</strong>, you&#8217;ll see that <strong>Classpath</strong> has been set to point to &#8220;<code>../as</code>&#8220;. This tells the Flash compiler that the <code>src/as</code> folder is where you&#8217;ll look for the class files for this application.</p>
<h3>3. Examining the PureMVC package</h3>
<p>The PureMVC package <code>org.puremvc.as3</code> (version 2.0.3) is located at <code>src/as/org/puremvc/as3</code> and has been included for your convenience. The AS3 port of the PureMVC framework is hosted <a href="http://puremvc.org/component/option,com_wrapper/Itemid,160/" target="_blank">here</a>. I strongly encourage you to spend some time reading the online <a href="http://puremvc.org/component/option,com_wrapper/Itemid,35/" target="_blank">documentation</a> if possible.</p>
<p>At any time during this tutorial, if you feel the need for a clearer understanding of PureMVC terminologies such as <em>Mediator</em>, <em>Proxy</em> or <em>Notification</em>, please feel free to refer to these classes. Cliff Hall has done an excellent job of commenting them and the comments will provide a clear picture of each class&#8217; role in the framework.</p>
<h3>4. Examining PureMVCSite.as and ApplicationFacade.as</h3>
<p>The main timeline of <code>PureMVCSite.fla</code> is linked to the document class <code>PureMVCSite</code> which is initialized when the application starts. <code>PureMVCSite.as</code> resides at the root of the <code>as</code> folder. When the application launches, <code>PureMVCSite</code> creates a Singleton instance of <code>ApplicationFacade</code>. The <code>ApplicationFacade</code> is the entry point to the PureMVC framework. When you instantiate <code>ApplicationFacade</code>, a whole slew of events take place behind the scenes to wire up your application with the PureMVC framework.</p>
<div class="codeblock">
<pre>
package
{
  import com.hubflanger.puremvcsite.ApplicationFacade;
  import flash.display.Sprite;

  public class PureMVCSite extends Sprite
  {
    private var facade:ApplicationFacade;

    public function PureMVCSite()
    {
      facade = ApplicationFacade.getInstance();
      facade.startup( this.stage );
    }
  }
}
</pre>
</div>
<p>Let&#8217;s first examine the static constants defined at the beginning of this class. <code>STARTUP</code><code>, </code><code>INITIALIZE_SITE</code> and <code>SECTION_CHANGED</code> represent the <em>Notification</em> names of the events that our application will be responding to. A <em>Notification</em> is the default messaging deployed by PureMVC to inform the framework of an event that has been dispatched. In PureMVC land, sending a <em>Notification</em> is synonymous with broadcasting an event. Only difference is, it does a little more than just broadcasting it to everyone, whether they want to hear it or not. PureMVC finds the select audience who are &#8220;ticket holders&#8221; to an event, and drives them to the venue. I will explain this in greater detail later.</p>
<div class="codeblock">
<pre>
package com.hubflanger.puremvcsite
{
  import org.puremvc.as3.interfaces.IFacade;
  import org.puremvc.as3.patterns.facade.Facade;
  import com.hubflanger.puremvcsite.controller.StartupCommand;

  public class ApplicationFacade extends Facade implements IFacade
  {
    public static const STARTUP:String      = "startup";
    public static const INITIALIZE_SITE:String  = "initializeSite";
    public static const SECTION_CHANGED:String  = "sectionChanged";

    public static function getInstance() : ApplicationFacade
    {
      if ( instance == null ) instance = new ApplicationFacade();
      return instance as ApplicationFacade;
    }

    override protected function initializeController() : void
    {
      super.initializeController();
      registerCommand( STARTUP, StartupCommand );
    }

    public function startup( stage:Object ):void
    {
      sendNotification( STARTUP, stage );
    }
  }
}
</pre>
</div>
<p><code>ApplicationFacade</code> overrides <code>initializeController()</code> to register <code>StartupCommand</code> with the <code>STARTUP</code> <em>Notification</em>. Behind the scenes, the <em>Controller</em> adds <code>StartupCommand</code> to its <code>commandMap</code> array and notes that <code>StartupCommand</code> is interested in listening for the <code>STARTUP</code> notification event.</p>
<p>The <code>startup()</code> method in <code>ApplicationFacade</code> is then explicitly called by <code>PureMVCSite</code>, passing in a reference to the <code>Stage</code>. This creates a <em>Notification</em> object with the name &#8220;startUp&#8221; and a reference to the <code>Stage</code> assigned to the its <code>body</code> property.</p>
<h3>5. Examining StartupCommand.as</h3>
<p>Upon receiving the <em>Notification</em>, the <em>Controller</em> iterates through its <code>commandMap</code> and retrieves <code>StartupCommand</code> as an object that is interested in the <code>STARTUP</code> notification. This results in the <code>execute()</code> method in <code>StartupCommand</code> being called.</p>
<div class="codeblock">
<pre>
package com.hubflanger.puremvcsite.controller
{
  import flash.display.Stage;
  import org.puremvc.as3.interfaces.ICommand;
  import org.puremvc.as3.interfaces.INotification;
  import org.puremvc.as3.patterns.command.SimpleCommand;
  import com.hubflanger.puremvcsite.ApplicationFacade;
  import com.hubflanger.puremvcsite.view.StageMediator;
  import com.hubflanger.puremvcsite.model.SiteDataProxy;

  public class StartupCommand extends SimpleCommand implements ICommand
  {
    override public function execute( note:INotification ) : void
    {
      var stage:Stage = note.getBody() as Stage;
      facade.registerMediator( new StageMediator( stage ) );
      facade.registerProxy( new SiteDataProxy() );
    }
  }
}
</pre>
</div>
<p>The <code>execute()</code> method in <code>StartupCommand</code> retrieves the reference to the <code>Stage</code> from the <em>Notification</em> and passes that along to an instance of the <code>StageMediator</code> being created. It also creates an instance of <code>SiteDataProxy</code>. </p>
<p><code>facade</code> is a built-in property of the <em>Mediator</em> and <em>Proxy</em> base classes from which <code>StageMediator</code> and <code>SiteDataProxy</code> extends respectively. It refers to the <code>ApplicationFacade</code> instance which extends the <em>Facade</em> base class. </p>
<p><code>facade.registerMediator()</code> registers the newly created <em>Mediator</em> instance with the <em>View</em> which stores it in its <code>mediatorMap</code>. The <em>Mediator</em> instance can be retrieved during runtime via a simple reference of its static <code>NAME</code> property using <code>facade.retrieveMediator()</code>.</p>
<p>Similarly, <code>facade.registerProxy()</code> registers the newly created <em>Proxy</em> instance with the <em>Model</em> which stores it in its <code>proxyMap</code>. The <em>Proxy</em> instance can also be retrieved by passing its <code>NAME</code> property to the <code>facade.retrieveProxy()</code> method.</p>
<p>At this point, you&#8217;ll probably start to notice a pattern here. The <em>Model</em>, <em>View</em> and <em>Controller</em> all have methods and properties that mirror each other, tying the <em>Proxy</em> to the <em>Model</em>, the <em>Mediator</em> to the <em>View</em> and the <em>Command</em> to the <em>Controller</em>. You&#8217;ll also notice that the <em>Facade</em> indeed provides a &#8220;shortcut&#8221; to accessing various parts of your application within the PureMVC framework. Nobody talks to the <em>Model</em>, <em>View</em> or <em>Controller</em> directly. Everybody goes through the middle man named <em>Facade</em>.</p>
<h3>6. Examining StageMediator.as</h3>
<p>The <code>StageMediator</code> facilitates the communication between the <code>Stage</code> and the PureMVC framework. The <code>Stage</code> instance is referenced via the <code>viewComponent</code> property inherited from the <em>Mediator</em> base class. In PureMVC convention, it is also commonplace to create an accessor method such as &#8220;<code>get stage()</code>&#8220;. Two very important methods of the <em>Mediator</em> instance are the <code>listNotificationInterests()</code> method and the <code>handleNotification()</code> method, which every <em>Mediator</em> subclass must override. </p>
<p><code>listNotificationInterests()</code> returns an array of <em>Notification</em> names as defined in <code>ApplicationFacade</code>, representing events that this particular <em>Mediator</em> is interested in. When the <em>View</em> runs through its list of <em>Observers</em>, it checks each <em>Mediator</em> against its <em>Notification</em> interests. If there is a match pertaining to a specific <em>Notification</em>, the <code>handleNotification()</code> method of that <em>Mediator</em> is called. This is what I was referring to earlier by the select audience who are &#8220;ticket holders&#8221; to an event. In this case, our <code>StageMediator</code> is interested in the <code>INITIALIZE_SITE</code> <em>Notification</em>.</p>
<p>The <em>Mediator</em> base class extends <em>Notifier</em> which means that in addition to responding to <em>Notification</em>s, it is also capable of sending out <em>Notification</em>s via the <code>sendNotification()</code> method. In other words, it can dispatch events. Although, unlike a MovieClip, it can&#8217;t dispatch any Flash Events, instead, it dispatches <em>Notification</em> objects.</p>
<div class="codeblock">
<pre>
package com.hubflanger.puremvcsite.view
{
  import com.hubflanger.puremvcsite.ApplicationFacade;
  import com.hubflanger.puremvcsite.view.component.Site;
  import flash.display.Stage;
  import flash.events.MouseEvent;
  import org.puremvc.as3.interfaces.*;
  import org.puremvc.as3.patterns.mediator.Mediator;

  public class StageMediator extends Mediator implements IMediator
  {
    public static const NAME:String = "StageMediator";

    public function StageMediator( viewComponent:Object )
    {
      super( NAME, viewComponent );
    }

    override public function listNotificationInterests():Array
    {
      return [
          ApplicationFacade.INITIALIZE_SITE
          ];
    }

    override public function handleNotification( note:INotification ):void
    {
      switch ( note.getName() )
      {
        case ApplicationFacade.INITIALIZE_SITE:
          initializeSite();
          break;
      }
    }

    private function initializeSite():void
    {
      var site:Site = new Site();
      facade.registerMediator( new SiteMediator( site ) );
      facade.registerMediator( new NavMediator( site.nav ) );
      stage.addChild( site );

      var navMediator:NavMediator = facade.retrieveMediator( NavMediator.NAME ) as NavMediator;
      sendNotification( ApplicationFacade.SECTION_CHANGED, navMediator.currentSection );
    }

    protected function get stage():Stage
    {
    return viewComponent as Stage;
    }
  }
}
</pre>
</div>
<h3>7. Examining SiteDataProxy.as</h3>
<p><code>SiteDataProxy</code> represents the data model for the application. It loads in dynamic data via xml and then parses and stores that information in a built-in property named &#8220;<code>data</code>&#8220;. Like the <em>Mediator</em>, the <em>Proxy</em> object also extends <em>Notifier</em> which makes it capable of sending out <em>Notification</em>s via the <code>sendNotification()</code> method. Unlike the <em>Mediator</em>, the <em>Proxy</em> does not have <em>Notification</em> interests and one can and should only update the <em>Proxy</em> via a <em>Command</em>.</p>
<div class="codeblock">
<pre>
package com.hubflanger.puremvcsite.model
{
  import com.hubflanger.puremvcsite.ApplicationFacade;
  import flash.events.Event;
  import flash.net.URLLoader;
  import flash.net.URLRequest;
  import org.puremvc.as3.interfaces.IProxy;
  import org.puremvc.as3.patterns.proxy.Proxy;

  public class SiteDataProxy extends Proxy implements IProxy
  {
    public static const NAME:String = "SpriteDataProxy";
    public var navIDs:Array;

    public function SiteDataProxy( )
    {
      super( NAME, new Object() );

      var loader:URLLoader = new URLLoader();
      loader.addEventListener( Event.COMPLETE, onDataLoaded );

      try {
        loader.load( new URLRequest( "data.xml" ));
      } catch ( error:Error ) {
        trace( "Unable to load requested document." );
      }
    }

    private function onDataLoaded( evt:Event ):void
    {
      var xml:XML = new XML( evt.target.data );
      xml.ignoreWhitespace = true;

      data.header = xml.header.children().toXMLString();

      var sections:XMLList = xml.sections.section;
      navIDs = new Array();

      for ( var i:uint=0; i&lt;sections.length(); i++ )
      {
        var section:XML = sections[ i ];
        var id:String = section.@id;
        navIDs[ i ] = id;

        var vo:SectionVO = new SectionVO( id,
                          section.@label,
                          section.content );
        data[ id ] = vo;
      }

      sendNotification( ApplicationFacade.INITIALIZE_SITE );
    }
  }
}
</pre>
</div>
<p>When <code>SiteDataProxy</code> is done parsing the xml data, it sends out a <code>INITIALIZE_SITE</code> <em>Notification</em>, resulting in the <code>handleNotification()</code> method of <code>StageMediator</code> being called. This in turn calls the <code>initializeSite()</code> method which initializes the <code>SiteMediator</code> and <code>NavMediator</code> instances. These two <em>Mediators</em> serve to facilitate communication between the <code>Site</code> movieclip and the <code>MainNav</code> movieclip with the framework.</p>
<h3>8. Examining SiteMediator.as</h3>
<p><code>SiteMediator</code> retrieves data from <code>SiteDataProxy</code> and calls <code>site.init()</code> to initialize the header text. It also declares an interest in the <code>SECTION_CHANGED</code> <em>Notification</em> event and calls <code>site.updateBody()</code> to update its content when such an event is dispatched.</p>
<div class="codeblock">
<pre>
package com.hubflanger.puremvcsite.view
{
  import com.hubflanger.puremvcsite.ApplicationFacade;
  import com.hubflanger.puremvcsite.model.*;
  import com.hubflanger.puremvcsite.view.component.Site;
  import org.puremvc.as3.interfaces.*;
  import org.puremvc.as3.patterns.mediator.Mediator;

  public class SiteMediator extends Mediator implements IMediator
  {
    public static const NAME:String = "SiteMediator";
    private var _siteDataProxy:SiteDataProxy;

    public function SiteMediator( viewComponent:Object )
    {
      super( NAME, viewComponent );

      _siteDataProxy = facade.retrieveProxy( SiteDataProxy.NAME ) as SiteDataProxy;
      var data:Object = _siteDataProxy.getData();
      site.init( data.header );
    }

    override public function listNotificationInterests():Array
    {
      return [
          ApplicationFacade.SECTION_CHANGED
          ];
    }

    override public function handleNotification( note:INotification ):void
    {
      switch ( note.getName() ) {
        case ApplicationFacade.SECTION_CHANGED:
          update( note.getBody() as String );
          break;
      }
    }

    private function update( s:String ):void
    {
      var data:Object = _siteDataProxy.getData();
      var vo:SectionVO = data[ s ];
      var content:XMLList = vo.content;

      site.updateBody( content.toXMLString() );
    }

    protected function get site():Site
    {
      return viewComponent as Site;
    }
  }
}
</pre>
</div>
<h3>9. Examining NavMediator.as and MainNav.as</h3>
<p><code>NavMediator</code> retrieves navigation id and label info from <code>SiteDataProxy</code> and passes that along to the <code>MainNav</code> instance, allowing <code>MainNav</code> to initialize its <code>navButton</code> instances. <code>MainNav</code> registers itself as an event listener of <code>MOUSE_DOWN</code> events triggered by the <code>navButton</code> instances. </p>
<p><code>NavMediator</code> in turn registers itself as an event listener of the <code>NAV_BUTTON_PRESSED</code> UIEvent bubbled up by the <code>MainNav</code> instance. Upon receiving such an event, <code>NavMediator</code> checks it against its <code>currentSection</code> variable to determine if a <code>SECTION_CHANGED</code> <em>Notification</em> should be sent.</p>
<p>When the <code>SECTION_CHANGED</code> <em>Notification</em> is sent, <code>SiteMediator</code> will respond and update the content in the <code>body</code> movieclip, and <code>NavMediator</code> will update its <code>navButton</code> instances to display the correct state depending on each button&#8217;s id.</p>
<div class="codeblock">
<pre>
package com.hubflanger.puremvcsite.view
{
  import com.hubflanger.puremvcsite.ApplicationFacade;
  import com.hubflanger.puremvcsite.model.*;
  import com.hubflanger.puremvcsite.view.component.MainNav;
  import com.hubflanger.puremvcsite.view.event.UIEvent;
  import org.puremvc.as3.interfaces.*;
  import org.puremvc.as3.patterns.mediator.Mediator;

  public class NavMediator extends Mediator implements IMediator
  {
    public static const NAME:String = "NavMediator";
    private var _siteDataProxy:SiteDataProxy;
    public var currentSection:String;

    public function NavMediator( viewComponent:Object )
    {
      super( NAME, viewComponent );

      _siteDataProxy = facade.retrieveProxy( SiteDataProxy.NAME ) as SiteDataProxy;
      nav.addEventListener( UIEvent.NAV_BUTTON_PRESSED, onNavButtonPressed );

      var data:Object = _siteDataProxy.getData();
      var navIDs:Array = _siteDataProxy.navIDs;
      var navLabels:Array = new Array();

      currentSection = navIDs[ 0 ];

      for ( var i:uint=0; i&lt;navIDs.length; i++ )
      {
        var id:String = navIDs[ i ];
        var vo:SectionVO = data[ id ];
        navLabels[ id ] = vo.label;
      } 

      nav.init( navIDs, navLabels );
    }

    override public function listNotificationInterests():Array
    {
      return [
          ApplicationFacade.SECTION_CHANGED
          ];
    }

    override public function handleNotification( note:INotification ):void
    {
      switch ( note.getName() ) {

        case ApplicationFacade.SECTION_CHANGED:
          nav.update( note.getBody() as String );
          break;
      }
    }

    private function onNavButtonPressed( evt:UIEvent ):void
    {
      if ( evt.id != currentSection ) {
        currentSection = evt.id;
        sendNotification( ApplicationFacade.SECTION_CHANGED, evt.id );
      }
    }

    protected function get nav():MainNav
    {
      return viewComponent as MainNav;
    }
  }
}
</pre>
</div>
<p></p>
<div class="codeblock">
<pre>
package com.hubflanger.puremvcsite.view.component
{
  import com.hubflanger.puremvcsite.view.event.UIEvent;
  import flash.display.MovieClip;
  import flash.events.*;

  public class MainNav extends MovieClip
  {
    public var btn0:MovieClip;
    public var btn1:MovieClip;
    public var btn2:MovieClip;
    private var navButtons:Array;

    public function MainNav()
    {
      navButtons = [ btn0, btn1, btn2 ];
    }

    public function init( navIDs:Array, labels:Array ):void
    {
      for ( var i:uint=0; i&lt;navIDs.length; i++ )
      {
        var id:String = navIDs[ i ];
        var btn:MovieClip = navButtons[ i ];
        btn.id = id;
        btn.txt.text = labels[ id ];
        btn.buttonMode = true;
        btn.mouseChildren = false;
        btn.addEventListener( MouseEvent.MOUSE_DOWN, onMouseDownHandler );
      }
    }

    public function update( s:String ):void
    {
      for ( var i:uint=0; i&lt;navButtons.length; i++ )
      {
        var btn:MovieClip = navButtons[ i ];

        if ( btn.id == s ) {
          btn.txt.textColor = 0x4B1E18;
        } else {
          btn.txt.textColor = 0xFFFFFF;
        }
      }
    }

    private function onMouseDownHandler( evt:Event ):void
    {
      dispatchEvent( new UIEvent( UIEvent.NAV_BUTTON_PRESSED, evt.target.id ));
    }
  }
}
</pre>
</div>
<h3>10. In Closing</h3>
<p>This is pretty much the gist of what happens within a PureMVC Flash application. It is my hope that this real-world example will help you get a jump start on using the PureMVC framework for your Flash projects. I also hope this tutorial managed to demonstrate the value and power of the MVC design pattern. As you start developing applications of greater complexity, using a framework such as PureMVC will help immensely in keeping your classes loosely-coupled, and easier to scale and maintain. Happy coding!</p>

]]></content:encoded>
			<wfw:commentRss>http://hubflanger.com/building-a-flash-site-using-puremvc/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to compile an AS3 Project with FDT</title>
		<link>http://hubflanger.com/how-to-compile-an-as3-project-with-fdt/</link>
		<comments>http://hubflanger.com/how-to-compile-an-as3-project-with-fdt/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 04:32:15 +0000</pubDate>
		<dc:creator>Peng</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[FDT]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Flex SDK]]></category>

		<guid isPermaLink="false">http://hubflanger.com/?p=38</guid>
		<description><![CDATA[Over the past couple of years, I&#8217;ve come to rely heavily on FDT for my Actionscript development work. An excellent plugin for the Eclipse IDE, FDT provides developers with a rich set of editing and refactoring tools unavailable in the Flash IDE. Back in the AS2 days, one can bypass the Flash IDE altogether and [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past couple of years, I&#8217;ve come to rely heavily on <a href="http://fdt.powerflasher.com/" target="_blank">FDT</a> for my Actionscript development work. An excellent plugin for the <a href="http://www.eclipse.org/" target="_blank">Eclipse</a> IDE, FDT provides developers with a rich set of editing and refactoring tools unavailable in the Flash IDE. Back in the AS2 days, one can bypass the Flash IDE altogether and compile his or her SWF directly in FDT using the MTASC compiler. With the release of <a href="http://www.adobe.com/products/flex/features/flex_builder/" target="_blank">Flex Builder</a> 2 (and now 3), one can compile AS3 projects directly using the Flex SDK.</p>
<p>Now, if you&#8217;re a fan of <a href="http://fdt.powerflasher.com/" target="_blank">FDT</a>, there&#8217;s no need to worry that you need to switch over to <a href="http://www.adobe.com/products/flex/features/flex_builder/" target="_blank">Flex Builder</a> for your AS3 projects. The latest version of <a href="http://fdt.powerflasher.com/" target="_blank">FDT</a> (ver. 3), provides a way to compile your AS3 projects using the open source <a href="http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK" target="_blank">Flex SDK</a> via the <code>fcsh</code> script. Instructions for doing so are available on the <a href="http://fdt.powerflasher.com/forum/viewtopic.php?t=1679" target=_blank">FDT forums</a>. In this tutorial, I&#8217;m going to show you how to do so step-by-step. <span id="more-38"></span></p>
<h3>1. Downloading and Installing the Flex SDK</h3>
<ul>
<li>First you need to download and install a copy of the <a href="http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3email">Flex SDK</a> from Adobe.</li>
<li>Unzip the archive and place the folder in a directory where its path contains no space. In OSX, I recommend using <code>/usr/local/flex_sdk_3</code>. In Windows, you may use <code>C:\flex_sdk_3</code>.</li>
</ul>
<p>I also highly recommend creating a new Workspace for your AS3 projects if you haven&#8217;t done so already.</p>
<h3>2. Set up Eclipse/FDT Preferences</h3>
<ul>
<li>In Eclipse, open the <strong>Preferences</strong> panel.</li>
<li>In the <strong>FDT->Core Libraries</strong> settings, select the <strong>AS3 Core Libraries</strong> tab.</li>
<li>Click the <strong>Fast Add&#8230;</strong> button.</li>
<li>In the <strong>Type</strong> drop-down menu, select <strong>Pure AS3 (Flex 3)</strong> and for the <strong>Path</strong> field, browse to the directory where you installed the Flex SDK. In my case, I use <code>/usr/local/flex_sdk_3</code> (<a href="/assets/fdt_flexsdk_tutorial/figure1.jpg" target="_blank">figure 1</a>). Click <strong>OK</strong>.</li>
<li>Back in the <strong>Preferences</strong> panel, make sure the <strong>Pure_AS3_Flex_3_0</strong> core library is checked (<a href="/assets/fdt_flexsdk_tutorial/figure2.jpg" target="_blank">figure 2</a>). Click <strong>OK</strong> to exit the <strong>Preferences</strong> panel.</li>
</ul>
<h3>3. Creating a New AS3 Project</h3>
<ul>
<li>In the <strong>Flash Explorer</strong> panel, right-click and select <strong>New->New Flash Project</strong>.</li>
<li>In the <strong>New Project Wizard</strong>, make sure that in the <strong>Project Language</strong> settings, <strong>Action Script 3</strong> is selected and set to <strong>Pure_AS3_Flex_3_0</strong> in the drop-down menu (<a href="/assets/fdt_flexsdk_tutorial/figure3.jpg" target="_blank">figure 3</a>). Click <strong>Next</strong>.</li>
<li>In the next window (<a href="/assets/fdt_flexsdk_tutorial/figure4.jpg" target="_blank">figure 4</a>), you will see that your project is automatically linked to <strong>playerglobal.swc</strong> in the Core Library. This SWC contains the Flash core library classes that you would need in order to compile an AS3 application. Click <strong>Finish</strong>.</li>
<li>Next, create a source folder by right-clicking on your project and selecting <strong>New->Source Folder</strong>. Name this folder <code>src</code> and place it in the root of your project directory.</li>
<li>Create your application (document) class by right-clicking on your project and selecting <strong>New->Class</strong>. Name your file <code>MyApp.as</code> and make sure that it extends <code>flash.display.Sprite</code>. Click <strong>Finish</strong>.</li>
<li>Create a folder named <code>build</code> in the root of your project by right-clicking your project and selecting <strong>New->Folder</strong>. This will be the output folder for your SWF.</li>
<li>In my example, I&#8217;ve typed in some code to draw a 100&#215;100 red square graphic (<a href="/assets/fdt_flexsdk_tutorial/figure5.jpg" target="_blank">figure 5</a>).</li>
</ul>
<h3>4. Setting up your Run Configurations</h3>
<ul>
<li>Right-click on the <code>MyApp.as</code> file and select <strong>Run As->Run Configurations&#8230;</strong></li>
<li>In the <strong>Run</strong> panel, with <strong>FDT AS3 Application</strong> selected, click the <strong>New</strong> icon to create a new configuration for your build setup.</li>
<li>With the new configuration selected, in the <strong>Main</strong> tab, browse to your project <code>MyAS3Project</code> for the <strong>Project</strong> field, your class <code>src/MyApp.as</code> for the <strong>Main Class</strong> field and type in <code>build/MyApp.swf</code> for the <strong>Output</strong> field. Click <strong>Apply</strong> and then click <strong>Run</strong>. This will create a default SWF in the build folder (<a href="/assets/fdt_flexsdk_tutorial/figure6.jpg" target="_blank">figure 6</a>).</li>
<li>In the <strong>Start SWF</strong> tab, check the <strong>Start SWF after compilation</strong> box and browse to <code>build/MyApp.swf</code>. This will allow FDT to auto-launch your SWF in the built-in <strong>SWF Viewer</strong> once it&#8217;s compiled (<a href="/assets/fdt_flexsdk_tutorial/figure7.jpg" target="_blank">figure 7</a>). <strong>Close</strong> the <strong>Run</strong> panel.</li>
</ul>
<h3>5. Compiling your SWF</h3>
<ul>
<li>In the <strong>Flash Explorer</strong> panel, you may now compile your SWF by simply right-clicking on <code>MyApp.as</code> and selecting <strong>Run As->FDT AS3 Application</strong>.</li>
<li>Select the <strong>SWF Viewer</strong> tab and review your SWF (<a href="/assets/fdt_flexsdk_tutorial/figure8.jpg" target="_blank">figure 8</a>).</li>
</ul>
<p>Unlike Flex Builder, this build set up does not automatically create a html wrapper for your swf. You will have to create it yourself or use an ANT build script to automate that.</p>
<h2>Migrating Existing AS3 Projects</h2>
<p>If possible, change your Default Core Library to the Flex SDK as described in Section 2. This will globally set up your workspace to use the Flex SDK as the default compiler. If you do not wish to do so, you may still set it for each project by right-clicking your project and selecting <strong>Properties</strong>. Select <strong>FDT Source Folder</strong> and click the <strong>Change Core Library</strong> button to change the core library as you would in the <strong>Preferences</strong> panel (<a href="/assets/fdt_flexsdk_tutorial/figure9.jpg" target="_blank">figure 9</a>).</p>
<p>In addition to setting up your <strong>Run Configurations</strong> as mentioned above, also make sure that in the <strong>Flex SDK</strong> tab that the <strong>Use Default SDK</strong> radio button is checked and that its value is set to <strong>Pure_AS3_Flex_3_0</strong> (<a href="/assets/fdt_flexsdk_tutorial/figure10.jpg" target="_blank">figure 10</a>).</p>
<p>Good luck and happy coding!</p>

]]></content:encoded>
			<wfw:commentRss>http://hubflanger.com/how-to-compile-an-as3-project-with-fdt/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PureMVC Tutorials</title>
		<link>http://hubflanger.com/puremvc-tutorials/</link>
		<comments>http://hubflanger.com/puremvc-tutorials/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 02:44:23 +0000</pubDate>
		<dc:creator>Peng</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[PureMVC]]></category>

		<guid isPermaLink="false">http://hubflanger.com/?p=36</guid>
		<description><![CDATA[I recently started looking into using PureMVC for our Flash projects at work. While the project site has plenty of great demos for one to download and examine, there aren&#8217;t enough tutorials out there that show step-by-step, how to start building an application using the framework. Fortunately, my friends over at 9M Media have put [...]]]></description>
			<content:encoded><![CDATA[<p>I recently started looking into using <a href="http://www.puremvc.org/" target="_blank">PureMVC</a> for our Flash projects at work. While the project site has plenty of great demos for one to download and examine, there aren&#8217;t enough tutorials out there that show step-by-step, how to start building an application using the framework. Fortunately, my friends over at <a href="http://9mmedia.com" target="_blank">9M Media</a> have put together an excellent series of articles on <a href="http://www.puremvc.org/" target="_blank">PureMVC</a> to help get you started. <a href="http://9mmedia.com/blog/?cat=9" target="_blank">Check it out</a> for yourselves. <span id="more-36"></span></p>
<p>The first 3 articles are: </p>
<p><a href="http://9mmedia.com/blog/?p=9" target="_blank">Why PureMVC Kicks Ass</a><br />
<a href="http://9mmedia.com/blog/?p=10" target="_blank">How to Setup Your First PureMVC Application</a><br />
<a href="http://9mmedia.com/blog/?p=22" target="_blank">Reusable Components using PureMVC</a></p>

]]></content:encoded>
			<wfw:commentRss>http://hubflanger.com/puremvc-tutorials/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cairngorm tutorials by David Tucker</title>
		<link>http://hubflanger.com/cairngorm-tutorials-by-david-tucker/</link>
		<comments>http://hubflanger.com/cairngorm-tutorials-by-david-tucker/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 01:15:00 +0000</pubDate>
		<dc:creator>Peng</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Actionscript]]></category>

		<category><![CDATA[Cairngorm]]></category>

		<guid isPermaLink="false">http://hubflanger.com/cairngorm-tutorials-by-david-tucker/</guid>
		<description><![CDATA[If you&#8217;re thinking of using Cairngorm in your Flex projects and would like a little help in getting started, David Tucker has prepared a great series of beginner tutorials on the subject. 
In five lessons, Tucker leads the student from setting up the ModelLocator, Events, Commands and Controller classes, to using Business Delegates and Value [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re thinking of using <a href="http://labs.adobe.com/wiki/index.php/Cairngorm" target="_blank">Cairngorm</a> in your Flex projects and would like a little help in getting started, David Tucker has prepared a great series of beginner tutorials on the subject. </p>
<p>In five lessons, Tucker leads the student from setting up the ModelLocator, Events, Commands and Controller classes, to using Business Delegates and Value Objects in the Service-to-Worker design pattern, finally ending with Best Practices. Each tutorial begins with some theory and explanations, then quickly segues to a hands-on video tutorial which demonstrates in great detail how all this is put together. <span id="more-35"></span></p>
<p>Apart from being unsuccessful in getting Coldfusion 8 to run on Leopard, which is a whole other issue completely (hello, Adobe?), these tutorials proved to be immensely helpful in getting me acquainted with the <a href="http://labs.adobe.com/wiki/index.php/Cairngorm" target="_blank">Cairngorm</a> framework. </p>
<p>Check it out at <a href="http://www.davidtucker.net/category/cairngorm/" target="_blank">http://www.davidtucker.net/category/cairngorm/</a>.</p>

]]></content:encoded>
			<wfw:commentRss>http://hubflanger.com/cairngorm-tutorials-by-david-tucker/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Leopard and Bash Shell environment paths</title>
		<link>http://hubflanger.com/leopard-and-bash-shell-environment-paths/</link>
		<comments>http://hubflanger.com/leopard-and-bash-shell-environment-paths/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 21:46:20 +0000</pubDate>
		<dc:creator>Peng</dc:creator>
		
		<category><![CDATA[OSX]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[Bash]]></category>

		<category><![CDATA[Leopard]]></category>

		<guid isPermaLink="false">http://hubflanger.com/leopard-and-bash-shell-environment-paths/</guid>
		<description><![CDATA[If you recently made the upgrade to Leopard and you're a frequent user of the OSX Terminal application, you may find that the environment paths that you had set up for the bash shell no longer work. Previously in Tiger, one can easily define those paths by creating a .bash_profile or .profile configuration file in the user directory, or editing the system-wide configuration file "/etc/.profile" directly (if you have root access).]]></description>
			<content:encoded><![CDATA[<p>If you recently made the upgrade to Leopard and you&#8217;re a frequent user of the OSX Terminal application, you may find that the environment paths that you had set up for the bash shell no longer work. Previously in Tiger, one can easily define those paths by creating a <code>.bash_profile</code> or <code>.profile</code> configuration file in the user directory, or editing the system-wide configuration file <code>/etc/.profile</code> directly if you have root access.</p>
<p>While I personally have never been able to make the configuration files work in the user directory, I&#8217;ve had success setting my environment paths in <code>/etc/.profile</code>. However, along with many other components that got shuffled around in the latest release of OSX, those profile settings are no longer found in the same locations. Oh why o why, Apple? <span id="more-34"></span></p>
<p>In Leopard, the road to setting environment paths is a rather convoluted one. I wish Apple had made it easier but to date, I haven&#8217;t come across any other simpler solution. Here are the few steps that I took to resolve the issue: </p>
<ol>
<li>If you open <code>/etc/.profile</code> in a text editor, you&#8217;d see that the Terminal now loads the environment paths via a configuration file in <code>/usr/libexec/path_helper</code>.</li>
<li>Opening the <code>path_helper</code> file reveals that environment paths are now collectively stored in a file aptly named <code>paths</code> in the <code>etc</code> directory. Open <code>/etc/paths</code> and you&#8217;d see that all the environment paths are neatly listed here. You can simply add your desired paths such as <code>/usr/local/mysql/bin</code> to this list.</li>
<li>Relaunch the Terminal and test.</li>
</ol>
<p>Please note that root user needs to be enabled in order for you to edit the <code>/etc/paths</code> file. To enable the root user, see this <a href="http://www.macosxhints.com/article.php?story=20071025100950309" target="_blank">article</a>. </p>

]]></content:encoded>
			<wfw:commentRss>http://hubflanger.com/leopard-and-bash-shell-environment-paths/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Free Flex video training</title>
		<link>http://hubflanger.com/free-flex-video-training/</link>
		<comments>http://hubflanger.com/free-flex-video-training/#comments</comments>
		<pubDate>Wed, 17 Oct 2007 02:49:20 +0000</pubDate>
		<dc:creator>Peng</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[training]]></category>

		<guid isPermaLink="false">http://hubflanger.com/free-flex-video-training/</guid>
		<description><![CDATA[For a limited time, Total Training™ is offering 30 day access to over 17 hours of their Adobe Flex 2 online training titles, absolutely FREE. The 2 modules available are:
Total Training™ for Adobe® Flex 2: Rich Internet Applications
by James Talbot and 
Total Training™ for Adobe® Flex 2: Advanced Visual Programming
by Leo Schuman. 
The tutorials are [...]]]></description>
			<content:encoded><![CDATA[<p>For a limited time, Total Training™ is offering 30 day access to over 17 hours of their <a href="http://www.totaltraining.com/Store/online_adobe_login.aspx">Adobe Flex 2 online training titles</a>, absolutely FREE. The 2 modules available are:</p>
<p><a href="http://www.totaltraining.com/prod/adobe/flex2_ria.asp">Total Training™ for Adobe® Flex 2: Rich Internet Applications</a><br />
by James Talbot and </p>
<p><a href="http://www.totaltraining.com/prod/adobe/flex2_avp.asp">Total Training™ for Adobe® Flex 2: Advanced Visual Programming</a><br />
by Leo Schuman. </p>
<p>The tutorials are presented at a brisk pace and provide a highly immersive experience as you follow along and learn to build your own applications. Highly recommended for Flash/Actionscript developers looking to learn Flex.</p>

]]></content:encoded>
			<wfw:commentRss>http://hubflanger.com/free-flex-video-training/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flash Player 9 H.264 Support</title>
		<link>http://hubflanger.com/flash-player-9-h264-support/</link>
		<comments>http://hubflanger.com/flash-player-9-h264-support/#comments</comments>
		<pubDate>Wed, 22 Aug 2007 00:00:04 +0000</pubDate>
		<dc:creator>Peng</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Flash Player]]></category>

		<category><![CDATA[H.264]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://hubflanger.com/flash-player-9-h264-support/</guid>
		<description><![CDATA[Adobe announced H.264 support in the latest update of Flash Player 9, officially sparking off speculations of impending iPhone support for Flash (alas!). More details can be found in Adobe&#8217;s press announcement.
Download the latest Flash Player update and check out this sample video which my friend Colin has kindly uploaded.

]]></description>
			<content:encoded><![CDATA[<p>Adobe announced H.264 support in the latest update of Flash Player 9, officially sparking off speculations of impending iPhone support for Flash (alas!). More details can be found in Adobe&#8217;s <a href="http://www.adobe.com/aboutadobe/pressroom/pressreleases/200708/082107FlashPlayer.html">press announcement</a>.</p>
<p><a href="http://labs.adobe.com/downloads/flashplayer9.html" target="_blank">Download</a> the latest Flash Player update and check out this <a href="http://staff.funnygarbage.com/colin/h264test.html" target="_blank">sample video</a> which my friend Colin has kindly uploaded.</p>

]]></content:encoded>
			<wfw:commentRss>http://hubflanger.com/flash-player-9-h264-support/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TabChildren</title>
		<link>http://hubflanger.com/tabchildren/</link>
		<comments>http://hubflanger.com/tabchildren/#comments</comments>
		<pubDate>Tue, 14 Aug 2007 03:16:56 +0000</pubDate>
		<dc:creator>Peng</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Accessibility]]></category>

		<category><![CDATA[tabChildren]]></category>

		<guid isPermaLink="false">http://hubflanger.com/tabchildren/</guid>
		<description><![CDATA[Recently, in a project for a client where we needed to make the application ADA compliant ie. keyboard accessible, we damn nearly pulled our hair out trying to figure out why, in spite of the fact that every button had been assigned an unique tabIndex value, we were still unable to tab to it. Turned [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, in a project for a client where we needed to make the application ADA compliant ie. keyboard accessible, we damn nearly pulled our hair out trying to figure out why, in spite of the fact that every button had been assigned an unique tabIndex value, we were still unable to tab to it. Turned out that the &#8220;tabChildren&#8221; property of the parent clip and its parent and so forth, all had to be set to &#8220;true&#8221;. I had thought that that was only necessary if one wanted the tabIndex to be automatically assigned to a particular movieclip&#8217;s child clips. Contrary to Adobe&#8217;s <a href="http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/js/html/wwhelp.htm" target="_blank">documentation</a>, this turns out not to be the case. Very strange indeed.</p>

]]></content:encoded>
			<wfw:commentRss>http://hubflanger.com/tabchildren/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flash Player 9 debug and Flash Tracer</title>
		<link>http://hubflanger.com/flash-player-9-debug-tracer/</link>
		<comments>http://hubflanger.com/flash-player-9-debug-tracer/#comments</comments>
		<pubDate>Thu, 26 Jul 2007 03:51:10 +0000</pubDate>
		<dc:creator>Peng</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[debug]]></category>

		<category><![CDATA[Flash Player]]></category>

		<category><![CDATA[Flash Tracer]]></category>

		<guid isPermaLink="false">http://hubflanger.com/flash/flash-player-9-debug-and-flash-tracer/</guid>
		<description><![CDATA[Adobe finally released a version of the debug Flash Player that works on the Intel Macs. Here&#8217;s how you can use the debugger with Sephiroth&#8217;s Flash Tracer plugin for Firefox to view your trace outputs in Firefox. 
Download and install the latest Flash Player 9 debugger version (9.0.r47).
Install the Flash Tracer extension for Firefox.
In the [...]]]></description>
			<content:encoded><![CDATA[<p>Adobe finally released a version of the debug Flash Player that works on the Intel Macs. Here&#8217;s how you can use the debugger with Sephiroth&#8217;s <a href="http://www.sephiroth.it/firefox/" target="_blank">Flash Tracer</a> plugin for Firefox to view your trace outputs in Firefox. <span id="more-29"></span></p>
<p>Download and install the latest <a href="http://www.adobe.com/support/flashplayer/downloads.html#fp9" target="_blank">Flash Player 9 debugger version (9.0.r47)</a>.</p>
<p>Install the <a href="http://www.sephiroth.it/firefox/" target="_blank">Flash Tracer</a> extension for Firefox.</p>
<p>In the Preference settings for Flash Tracer, set the path to your flashlog:<br />
<code>Macintosh HD:Users:YourUserName:Library:Preferences:Macromedia:Flash Player:Logs:flashlog.txt</code></p>
<p>In XP, you&#8217;d find flashlog.txt here:<br />
<code>C:\Documents and Settings\YourUserName\Application Data\Macromedia\Flash Player\Logs\flashlog.txt</code></p>
<p>Fire up Flash Tracer from the Tools menu in Firefox.</p>
<p>Go to <a href="http://www.adobe.com/" target="_blank">Adobe&#8217;s home page</a> and voila! Enjoy the debugger in its full glory! </p>
<p>You wouldn&#8217;t think that Adobe&#8217;s developers would be so careless to leave their trace statements running in their published files, but I guess they&#8217;re only human like the rest of us.</p>

]]></content:encoded>
			<wfw:commentRss>http://hubflanger.com/flash-player-9-debug-tracer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>AS3 Explorations</title>
		<link>http://hubflanger.com/as3-explorations/</link>
		<comments>http://hubflanger.com/as3-explorations/#comments</comments>
		<pubDate>Sun, 25 Feb 2007 22:04:33 +0000</pubDate>
		<dc:creator>Peng</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[CS3]]></category>

		<guid isPermaLink="false">http://localhost/hubflanger/?p=3</guid>
		<description><![CDATA[Today, I played around with Actionscript 3 and the Flash 9 AS3 Preview release. Turns out that the AS3 Preview currently does not support the Intel-based Macs. When you try to compile, or export as one used to say, you get an error message, &#8220;Error initializing java runtime environment. You may need to reinstall flash?&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I played around with Actionscript 3 and the Flash 9 AS3 Preview release. Turns out that the AS3 Preview currently does not support the Intel-based Macs. When you try to compile, or export as one used to say, you get an error message, &#8220;Error initializing java runtime environment. You may need to reinstall flash?&#8221; The Flash IDE then crashes. According to Adobe, they have no plans to offer any Intel-based Mac support for the preview releases. I guess we&#8217;ll just have to wait for the official release of Flash CS3 to see the new Flash 9 IDE in action on an Intel-Mac. With the increasing number of Flash developers switching to the Mac platform, I find this lack of support by Adobe particularly hostile and disturbing. <span id="more-3"></span></p>
<p>If you are intent on trying out the AS3 Preview on an Intel-Mac, there are ways of getting around the problem such as installing the PC version on your Parallels-Windows VM or Bootcamp-Windows. Or you may just decide to stick with Flex Builder 2 for now, which is exactly what I&#8217;m going to do.</p>

]]></content:encoded>
			<wfw:commentRss>http://hubflanger.com/as3-explorations/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
