<?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>Words, punctuated &#187; ActionScript</title>
	<atom:link href="http://probertson.com/articles/category/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://probertson.com</link>
	<description>Thoughts on web development, user-centered design, code, etc. by Paul Robertson</description>
	<lastBuildDate>Mon, 30 Aug 2010 16:38:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Simple ActionScript 3 animation examples</title>
		<link>http://probertson.com/articles/2010/07/20/simple-actionscript-3-animation-examples/</link>
		<comments>http://probertson.com/articles/2010/07/20/simple-actionscript-3-animation-examples/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 16:20:34 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=449</guid>
		<description><![CDATA[Last week I spent a little time teaching some of the newer developers in our office about scripted animation in ActionScript 3. I put together a few simple demos for them, and I thought I might as well share them with the world.
Note that these are basic demos so if you know pretty much anything [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I spent a little time teaching some of the newer developers in our office about scripted animation in ActionScript 3. I put together a few simple demos for them, and I thought I might as well share them with the world.</p>
<p>Note that these are basic demos so if you know pretty much anything about animation in ActionScript, these may not teach you anything.</p>
<p>All these scripts do pretty much the same thing. They draw a square on the stage. When you click on it, it moves horizontally from x=100 to x=400. Each of these is a class that you can run as the main class of an AS3 application.</p>
<h2>1. The wrong way</h2>
<p>The wrong way, of course, is to use a for loop:</p>
<pre class="brush:actionscript3">package
{
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.display.Sprite;
    public class BasicAnimation extends Sprite
    {
        // ------- Constructor -------

        public function BasicAnimation()
        {
            _createChildren();
        }

        // ------- Child display objects -------

        private var _rect:Sprite;

        // ------- Private constants -------

        private const START:int = 100;
        private const END:int = 400;

        // ------- Private methods -------

        private function _createChildren():void
        {
            _rect = new Sprite();
            _rect.graphics.beginFill(0xff0000, 1);
            _rect.graphics.drawRect(0, 0, 100, 100);
            _rect.graphics.endFill();
            _rect.x = START;
            addChild(_rect);
            _rect.addEventListener(MouseEvent.CLICK, _rect_click);
        }

        // ------- Event handling -------

        private function _rect_click(event:MouseEvent):void
        {
            // wrong way:
            _rect.x = START;
            while (_rect.x < END)
            {
                _rect.x++;
            }
        }
    }
}</pre>
<h2>The right way (most basic)</h2>
<p>Of course, this one runs very slow since it&#8217;s moving at a rate of 1 pixel per frame.</p>
<pre class="brush:actionscript3">package
{
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.display.Sprite;
    public class BasicAnimation extends Sprite
    {
        // ------- Constructor -------

        public function BasicAnimation()
        {
            _createChildren();
        }

        // ------- Child display objects -------

        private var _rect:Sprite;

        // ------- Private constants -------

        private const START:int = 100;
        private const END:int = 400;

        // ------- Private methods -------

        private function _createChildren():void
        {
            _rect = new Sprite();
            _rect.graphics.beginFill(0xff0000, 1);
            _rect.graphics.drawRect(0, 0, 100, 100);
            _rect.graphics.endFill();
            _rect.x = START;
            addChild(_rect);
            _rect.addEventListener(MouseEvent.CLICK, _rect_click);
        }

        // ------- Event handling -------

        private function _rect_click(event:MouseEvent):void
        {
            // right way (very basic):
            addEventListener(Event.ENTER_FRAME, _enterFrameBasic);
        }

        private function _enterFrameBasic(event:Event):void
        {
            if (_rect.x < END)
            {
                _rect.x++;
            }
            else
            {
                removeEventListener(Event.ENTER_FRAME, _enterFrameBasic);
            }
        }
    }
}</pre>
<h2>Adding velocity as a variable</h2>
<p>The solution to the slowness is to add a velocity variable. The value (in units of pixels per frame) will determine how quickly the animation moves. Basically you just try different values until you&#8217;re happy with something. Like the previous example, this is a purely linear animation &#8212; the velocity stays constant.</p>
<pre class="brush:actionscript3">package
{
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.display.Sprite;
    public class BasicAnimation extends Sprite
    {
        // ------- Constructor -------

        public function BasicAnimation()
        {
            _createChildren();
        }

        // ------- Child display objects -------

        private var _rect:Sprite;

        // ------- Private constants -------

        private const START:int = 100;
        private const END:int = 400;

        // ------- Private methods -------

        private function _createChildren():void
        {
            _rect = new Sprite();
            _rect.graphics.beginFill(0xff0000, 1);
            _rect.graphics.drawRect(0, 0, 100, 100);
            _rect.graphics.endFill();
            _rect.x = START;
            addChild(_rect);
            _rect.addEventListener(MouseEvent.CLICK, _rect_click);
        }

        // ------- Event handling -------

        private function _rect_click(event:MouseEvent):void
        {
            // right way (very basic):
            addEventListener(Event.ENTER_FRAME, _enterFrameBasic);
        }

        private function _enterFrameBasic(event:Event):void
        {
            if (_rect.x < END)
            {
                var velocity:int = 5;
                _rect.x += velocity;
            }
            else
            {
                removeEventListener(Event.ENTER_FRAME, _enterFrameBasic);
            }
        }
    }
}</pre>
<h2>Adding acceleration</h2>
<p>Once you&#8217;ve separated out velocity, it becomes easy to make the animation non-linear by adding an acceleration value that causes the velocity to change over time. We&#8217;re just stepping back one level of complexity &#8212; the acceleration is now linear instead of the velocity.</p>
<pre class="brush:actionscript3">package
{
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.display.Sprite;
    public class BasicAnimation extends Sprite
    {
        // ------- Constructor -------

        public function BasicAnimation()
        {
            _createChildren();
        }

        // ------- Child display objects -------

        private var _rect:Sprite;

        // ------- Private constants -------

        private const START:int = 100;
        private const END:int = 400;

        // ------- Private methods -------

        private function _createChildren():void
        {
            _rect = new Sprite();
            _rect.graphics.beginFill(0xff0000, 1);
            _rect.graphics.drawRect(0, 0, 100, 100);
            _rect.graphics.endFill();
            _rect.x = START;
            addChild(_rect);
            _rect.addEventListener(MouseEvent.CLICK, _rect_click);
        }

        // ------- Event handling -------

        private function _rect_click(event:MouseEvent):void
        {
            // right way (very basic):
            addEventListener(Event.ENTER_FRAME, _enterFrameBasic);
        }

        private var _velocity:int = 0;

        private function _enterFrameBasic(event:Event):void
        {
            if (_rect.x < END)
            {
                var accel:int = 3;
                _velocity += accel;
                _rect.x += _velocity;
            }
            else
            {
                removeEventListener(Event.ENTER_FRAME, _enterFrameBasic);
            }
        }
    }
}
</pre>
<h2>Interpolating values over time</h2>
<p>This next example doesn&#8217;t build on the previous ones but instead takes a completely separate approach to creating animation. This animation is time-driven rather than frame-driven. Instead of adding a particular number of pixels to the x value each frame, it calculates how much time has elapsed since the start and what the x value should be at that moment in time, then sets the x property to that value. A consequence of this approach is that regardless of the frame rate of the SWF, the animation will always last the same amount of time.</p>
<pre class="brush:actionscript3">package
{
    import flash.utils.getTimer;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.display.Sprite;
    public class AnimationIntermediate extends Sprite
    {
        // ------- Constructor -------

        public function AnimationIntermediate()
        {
            _createChildren();
        }

        // ------- Child display objects -------

        private var _rect:Sprite;

        // ------- Private constants -------

        private const START:int = 100;
        private const END:int = 400;
        private const TOTAL_TIME:int = 5000;

        // ------- Private methods -------

        private function _createChildren():void
        {
            _rect = new Sprite();
            _rect.graphics.beginFill(0xff0000, 1);
            _rect.graphics.drawRect(0, 0, 100, 100);
            _rect.graphics.endFill();
            _rect.x = START;
            addChild(_rect);
            _rect.addEventListener(MouseEvent.CLICK, _rect_click);
        }

        // ------- Event handling -------

        private var _startTime:int = 0;

        private function _rect_click(event:MouseEvent):void
        {
            // right way (intermediate):
            _startTime = getTimer();
            addEventListener(Event.ENTER_FRAME, _enterFrameIntermediate);
        }

        private function _enterFrameIntermediate(event:Event):void
        {
            var elapsedTime:int = getTimer() - _startTime;
            var fractionComplete:Number = elapsedTime / TOTAL_TIME;

            if (fractionComplete < 1)
            {
                var totalDistance:int = END - START;
                var offset:int = Math.round(fractionComplete * totalDistance);
                _rect.x = START + offset;
            }
            else
            {
                _rect.x = END;
                removeEventListener(Event.ENTER_FRAME, _enterFrameIntermediate);
            }
        }
    }
}</pre>
<p>The main point of this example is to demonstrate the idea that you can plug in an algorithm that calculates position given time, and by varying the algorithm you can vary the animation. This is a direct lead-in to the idea of using tweening functions to vary an animation, as demonstrated in the next example.</p>
<h2>Using an animation library</h2>
<p>This example shows the use of a third-party animation library (in this case Grant Skinner&#8217;s <a href="http://www.gskinner.com/libraries/gtween/">GTween</a> library). The commented-out lines demonstrate how a library makes it easy to synchronize animation and vary the animation. Note that this is only meant as a very basic demonstration of the concept of using a library for animation &#8212; GTween and the many other animation libraries that are out there all provide many additional features.</p>
<pre class="brush:actionscript3">package
{
    import com.gskinner.motion.easing.Bounce;
    import com.gskinner.motion.easing.Sine;
    import com.gskinner.motion.GTween;
    import flash.events.MouseEvent;
    import flash.display.Sprite;
    public class AnimationTween extends Sprite
    {
        // ------- Constructor -------

        public function AnimationTween()
        {
            _createChildren();
        }

        // ------- Child display objects -------

        private var _rect:Sprite;

        // ------- Private constants -------

        private const START:int = 100;
        private const END:int = 400;
        private const TOTAL_TIME:int = 5;

        // ------- Private methods -------

        private function _createChildren():void
        {
            _rect = new Sprite();
            _rect.graphics.beginFill(0xff0000, 1);
            _rect.graphics.drawRect(0, 0, 100, 100);
            _rect.graphics.endFill();
            _rect.x = START;
            addChild(_rect);
            _rect.addEventListener(MouseEvent.CLICK, _rect_click);
        }

        // ------- Event handling -------

        private function _rect_click(event:MouseEvent):void
        {
            var tween:GTween = new GTween(_rect, TOTAL_TIME);
            tween.setValue("x", END);
//            tween.setValue("alpha", .5);
//            tween.ease = Sine.easeInOut;
//            tween.ease = Bounce.easeOut;
        }
    }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2010/07/20/simple-actionscript-3-animation-examples/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Slides, examples, and links: Developing iPhone apps with the Flash Platform</title>
		<link>http://probertson.com/articles/2010/03/16/slides-and-examples-developing-iphone-apps-flash-platform/</link>
		<comments>http://probertson.com/articles/2010/03/16/slides-and-examples-developing-iphone-apps-flash-platform/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 00:57:00 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=417</guid>
		<description><![CDATA[
Last week I gave a presentation at 360&#124;Flex 2010 (San Jose) on &#8220;Developing iPhone apps with the Flash Platform.&#8221; As always, I wanted to make my slides, notes, reference links, and example code available to those who were there and those who couldn&#8217;t make it:
Download slides, links, and example code (3.1 MB .zip)
I&#8217;ve been traveling [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/resources/2010/03/16/iphone_flash_platform_resources.jpg" alt="Flash logo pointing to iPhone with presentation title" /></p>
<p>Last week I gave a presentation at 360|Flex 2010 (San Jose) on &#8220;Developing iPhone apps with the Flash Platform.&#8221; As always, I wanted to make my slides, notes, reference links, and example code available to those who were there and those who couldn&#8217;t make it:</p>
<p><a href="/resources/2010/03/16/iphone_flash_platform_resources.zip">Download slides, links, and example code</a> (3.1 MB .zip)</p>
<p>I&#8217;ve been traveling since the conference so I didn&#8217;t flesh out my notes as thoroughly as I have for past presentations. If you have a question about a slide, feel free to ask in the comments and I&#8217;ll try to explain it better. The 360|Flex folks recorded video of my presentation as well as a screen capture. I believe the plan is to make those recordings available to attendees as well as people who couldn&#8217;t make it (though they may charge a fee if you didn&#8217;t attend the conference).</p>
<h2>Acknowledgments</h2>
<p>This is in the slides, but I wanted to once again thank all the people who helped me prepare this presentation (some knowingly, others just by virtue of content they&#8217;ve shared):</p>
<ul>
<li><a href="http://flashrealtime.com/">Tom Krcha</a></li>
<li><a href="http://renaun.com/">Renaun Erickson</a></li>
<li><a href="http://www.linkedin.com/pub/jeff-swartz/1/52/b84">Jeff Swartz</a></li>
<li><a href="http://adityabansod.net/">Aditya Bansod</a></li>
<li><a href="http://www.onflash.org/">Ted Patrick</a></li>
<li><a href="http://www.mikechambers.com/">Mike Chambers</a></li>
<li><a href="http://theflashblog.com/">Lee Brimelow</a></li>
<li><a href="http://www.linkedin.com/in/chiedozi">Chiedo Acholonu</a></li>
<li><a href="http://twitter.com/gburch">Greg Burch</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2010/03/16/slides-and-examples-developing-iphone-apps-flash-platform/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New project: AIR SQLite utilities</title>
		<link>http://probertson.com/articles/2010/02/03/new-project-air-sqlite-utilities/</link>
		<comments>http://probertson.com/articles/2010/02/03/new-project-air-sqlite-utilities/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 20:44:55 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Application Design]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[local SQL database]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=367</guid>
		<description><![CDATA[I&#8217;m excited to announce that I&#8217;m &#8220;officially&#8221; releasing a new open-source project that I&#8217;ve been using on personal and work projects for over a year.
For lack of a better name, I call it my &#8220;AIR SQLite utility library&#8221;
The code currently contains one major piece of functionality (well, two different variations on one bit of functionality), [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m excited to announce that I&#8217;m &#8220;officially&#8221; releasing a new open-source project that I&#8217;ve been using on personal and work projects for over a year.</p>
<p>For lack of a better name, I call it my &#8220;<a href="/projects/air-sqlite/">AIR SQLite utility library</a>&#8221;</p>
<p>The code currently contains one major piece of functionality (well, two different variations on one bit of functionality), which is a SQL &#8220;query runner&#8221; library. This is a wrapper for the AIR SQL classes that allows you to run a SQL statement by just passing a few bits of information:</p>
<ul>
<li>The text of the SQL statement itself</li>
<li>An object containing properties with the values for any statement parameters in the SQL</li>
<li>A Function to call when the operation completes</li>
<li>A failure Function</li>
<li>(optionally) a class to use as the data type for the data returned from a <code>SELECT</code> statement</li>
</ul>
<p>The library does all the work of creating SQLStatement objects and caching prepared queries, as well as pooling SQLConnection instances so you can execute multiple statements simultaneously. It also has a variation that allows you to specify a &#8220;batch&#8221; of statements to execute, and they are executed in order in a transaction.</p>
<p>I&#8217;ve also got an additional utility to add to the library. It&#8217;s a &#8220;database copy&#8221; utility that allows you to create a &#8220;deep copy&#8221; of a database &#8212; all it&#8217;s tables, views, etc. &#8212; with or without data. The key reason why this is useful is that you can use it to create an encrypted database from an unencrypted database (and vice-versa). It&#8217;s written and tested, but I decided to modify the structure slightly before releasing it, so it&#8217;s not checked in yet.</p>
<p>I&#8217;ve put the details about how it works and why it&#8217;s designed that way in <a href="/projects/air-sqlite/">the project page</a>. In case you&#8217;ve ever wondered how I design apps, I think the examples and this library give some insight into how I actually do my database-driven AIR app development. At least, how I structure the data-access part of my apps.</p>
<p>On (another) personal note, this project is also my first project that I&#8217;ve posted to <a href="http://github.com/probertson">my Github repository</a> (as opposed to projects I&#8217;ve forked). It was actually posted-but-not-advertised on Google code for a month or so, but I decided to move to Github because the collaboration and checkin-without-network-connection features are so awesome.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2010/02/03/new-project-air-sqlite-utilities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building iPhone apps with Flash Platform tools roundup</title>
		<link>http://probertson.com/articles/2009/10/05/building-iphone-apps-with-flash-platform-tools-roundup/</link>
		<comments>http://probertson.com/articles/2009/10/05/building-iphone-apps-with-flash-platform-tools-roundup/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 21:35:36 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles to remember]]></category>
		<category><![CDATA[Elsewhere on the web]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=340</guid>
		<description><![CDATA[Lots of news and rumors are flying around right now about developing iPhone apps using Flash Platform tools. Here&#8217;s a collection of links that I&#8217;ve found, some the official information and some information from folks who were involved in developing this cool new technology:

First thing first: if you haven&#8217;t seen the MythHackers video about Flash [...]]]></description>
			<content:encoded><![CDATA[<p>Lots of news and rumors are flying around right now about developing iPhone apps using Flash Platform tools. Here&#8217;s a collection of links that I&#8217;ve found, some the official information and some information from folks who were involved in developing this cool new technology:</p>
<ul>
<li>First thing first: if you haven&#8217;t seen the <a href="http://www.youtube.com/watch?v=lzqd5mHWTHE">MythHackers video about Flash on the iPhone</a>, you must go watch it. I laughed so hard my eyes were watering.</li>
<li>Aditya Bansod&#8217;s ADC article &#8220;<a href="http://www.adobe.com/devnet/logged_in/abansod_iphone.html">Developing for the Apple iPhone using Flash</a>,&#8221; from the Product Manager who&#8217;s in charge of the Flash Platform development for iPhone effort. Includes some technicial details on how it actually works and how you build the apps.</li>
<li><a href="http://labs.adobe.com/technologies/flashcs5/appsfor_iphone/">Adobe Labs: Apps for iPhone</a>: Video demo and list of apps that are already in the app store today</li>
<li><a href="http://labs.adobe.com/wiki/index.php/Applications_for_iPhone">Adobe Labs developer FAQ</a>: this has the most information about what this really means for developers</li>
<li>Mike Chambers is, as always, a great resource for information on this topic. He has <a href="http://www.mikechambers.com/blog/2009/10/05/building-applications-for-the-iphone-with-flash/">a nice summary blog post</a>, plus I know he&#8217;s collecting questions to answer in his MAX session (on Wednesday, I believe).</li>
<li>Arno Gourdol, engineering manager for Adobe AIR (and huge iPhone fan and former Apple employee) talks briefly about <a href="http://arno.org/arnotify/2009/10/max-2009-adobe-air-2-0-and-iphone-support/">the underlying technology, with a focus on MAX sessions where you can learn more</a>.</li>
<li>Never one to hold back his enthusiasm, Ted Patrick has posted <a href="http://onflash.org/ted/2009/10/source-to-4-flash-iphone-apps.php">the source code for three different Flash Platform iPhone apps he wrote</a>, that can be seen on the demo phones in the Adobe booth at MAX. (He says it&#8217;s four apps in the blog title, but he explains that two of them are the same app with and without hardware acceleration.)</li>
</ul>
<p>That&#8217;s all for now. I&#8217;ll keep updating the list as I find more resources.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2009/10/05/building-iphone-apps-with-flash-platform-tools-roundup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New article &#8220;Programming with the Vector class&#8221;</title>
		<link>http://probertson.com/articles/2009/09/14/programming-with-the-vector-class/</link>
		<comments>http://probertson.com/articles/2009/09/14/programming-with-the-vector-class/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 23:40:31 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Vector (typed arrays)]]></category>
		<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=326</guid>
		<description><![CDATA[Several months ago (probably almost a year ago) I wrote an article for the Adobe Developer Connection titled &#8220;Programming with the Vector class.&#8221; As you can surely guess, the article is about the Vector class, which provides typed array functionality (an array whose elements are required to all be instances of the same data type). [...]]]></description>
			<content:encoded><![CDATA[<p>Several months ago (probably almost a year ago) I wrote an article for the Adobe Developer Connection titled &#8220;<a href="http://www.adobe.com/devnet/flash/quickstart/programming_vectors_as3/">Programming with the Vector class</a>.&#8221; As you can surely guess, the article is about the Vector class, which provides typed array functionality (an array whose elements are required to all be instances of the same data type). The Vector class was added to ActionScript in Flash Player 10 and AIR 1.5.</p>
<p>Apparently the article got lost in the shuffle, and about a week ago they found it and asked me to review their changes. I just found out that the article was published today.</p>
<p>Although it&#8217;s grouped under the &#8220;quick starts&#8221; category, it has a lot of detail. Also, it&#8217;s included in the Flash developer center but Flex developers shouldn&#8217;t be put off by that. It&#8217;s really about a core ActionScript class that&#8217;s available anywhere you&#8217;re writing ActionScript. (I&#8217;ve always found the ADC&#8217;s forced boundaries between Flash, Flex, and AIR to be too constraining for reality.)</p>
<p>I personally think the article provides a good, in-depth introduction to various aspects of working with the Vector class. In particular, it has guidance on areas that some people find problematic, such as the type parameter syntax and the fact that you have to provide your own custom sorting code (and of course the article includes examples to copy). I personally think it&#8217;s better than the developer guide documentation on the Vector class. (And I wrote them both so I&#8217;m not just showing a bias for my own work =)</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2009/09/14/programming-with-the-vector-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts from 360&#124;Flex day one</title>
		<link>http://probertson.com/articles/2009/05/18/thoughts-from-360flex-day-one/</link>
		<comments>http://probertson.com/articles/2009/05/18/thoughts-from-360flex-day-one/#comments</comments>
		<pubDate>Tue, 19 May 2009 03:49:21 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Elsewhere on the web]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Sites to remember]]></category>
		<category><![CDATA[Unit testing]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=276</guid>
		<description><![CDATA[Here are a few things that stood out to me the most in this great day at the greatest Flex conference on the planet:

FlexUnit 4. Wow. Big update. Very nice new features. Time to get (back) into it. (presentation by Michael Labriola)
Renaun Erickson&#8217;s Structured Log Testing framework. Another great, unexpected surprise. I didn&#8217;t really have [...]]]></description>
			<content:encoded><![CDATA[<p>Here are a few things that stood out to me the most in this great day at <a href="http://360flex.com/">the greatest Flex conference on the planet</a>:</p>
<ul>
<li><a href="http://opensource.adobe.com/wiki/display/flexunit/FlexUnit">FlexUnit 4</a>. Wow. Big update. Very nice new features. Time to get (back) into it. (presentation by <a href="http://blogs.digitalprimates.net/codeslinger/">Michael Labriola</a>)</li>
<li><a href="http://renaun.com/blog/">Renaun Erickson</a>&#8217;s <a href="http://structuredlogs.com/">Structured Log Testing framework</a>. Another great, unexpected surprise. I didn&#8217;t really have plans to go to this session except that Renaun&#8217;s such a smart, friendly guy. And frankly, I&#8217;ve never really had enough interest to take a look at his work on this project so far. Boy am I glad I changed my mind. This is definitely a testing approach I can get into &#8212; much less overhead than other approaches I&#8217;ve seen. Getting going with it is only barely more work than adding <code>trace()</code> calls. And the result is certainly infinitely more valuable.</li>
</ul>
<p>Considering I didn&#8217;t come to Indianapolis with any real interest in hearing more about testing&#8230;I&#8217;m surprised to find myself so excited by what I saw today. Today is a great day for Flex testing, that&#8217;s for sure.</p>
<p>I also got to hear some interesting ideas and future plans from <a href="http://jacwright.com/">Jacob Wright</a> and <a href="http://www.xtyler.com/">Tyler Wright</a>. (They made me a bit jealous &#8212; I wish I had a Flex programmer brother that I could see at conferences.) If you&#8217;re in Indianapolis, I recommend checking out their &#8220;write-in&#8221; session on the <a href="http://www.flightxd.com/flightframework/">Flight Framework</a> at 10am Tuesday in the Illinois East room.</p>
<p>Other less code-centric, but interesting, tidbits:</p>
<ul>
<li><a href="http://joeberkovitz.com/">Joe Berkovitz</a> is an avid mountain biker.</li>
<li><a href="http://blog.benstucki.net/">Ben Stucki</a> has a sweet five-year-old daughter who likes deep-fried calamari and pasta, although she wasn&#8217;t able to finish her macaroni and cheese at <a href="http://www.bucadibeppo.com/">Buca di Beppo</a>, where apparently even the child meals are sized to feed 3-4 people.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2009/05/18/thoughts-from-360flex-day-one/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Please test: updated ActionScript GZIP library with Flash Player 10 support</title>
		<link>http://probertson.com/articles/2009/02/27/actionscript-gzip-library-flash-player-10/</link>
		<comments>http://probertson.com/articles/2009/02/27/actionscript-gzip-library-flash-player-10/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 22:40:50 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=232</guid>
		<description><![CDATA[Since I first created my ActionScript GZIP library as a test of Adobe AIR&#8217;s file compression capability, the number one request I&#8217;ve received has been to add support for Flash Player-only projects. With the release of Flash Player 10 last fall, I couldn&#8217;t use the lack of player support as an excuse any more. So [...]]]></description>
			<content:encoded><![CDATA[<p>Since I first created my <a href="/projects/gzipencoder/">ActionScript GZIP library</a> as a test of Adobe AIR&#8217;s file compression capability, the number one request I&#8217;ve received has been to add support for Flash Player-only projects. With the release of Flash Player 10 last fall, I couldn&#8217;t use the lack of player support as an excuse any more. So now I&#8217;ve just been using the &#8220;not enough time&#8221; excuse&#8230;</p>
<p>But not any more. A few days ago I checked in a beta (barely tested) version of that adds support for Flash Player 10 (browser) projects. It&#8217;s not linked from the main google code project page yet, but you can get to it from the <a href="http://code.google.com/p/ascompress/downloads/list">GZIP encoder project downloads page</a>.</p>
<p>The download that adds Flash Player 10 support is &#8220;ascompress-.2.0.zip&#8221;. It now includes two SWC files:</p>
<ul>
<li>GZIPEncoder_AIR.swc is the full package, with all the same features as the previous release (.1.0.2).</li>
<li>
<p>GZIPEncoder_Flash.swc is the Flash-Player-only version. It only compresses/uncompresses ByteArrays, and doesn&#8217;t have any support for files.</p>
<p>Of course, since Flash Player 10 also adds local file opening/saving support that uses ByteArray data for the files, you could easily write your own code to prompt the user for a gzip file, or compress a file and prompt the user to save it. For an example of opening and saving files from Flash Player 10, see my quick start article: &#8220;&#8221;</p>
</li>
</ul>
<p>As I implied when I described this as &#8220;beta (barely tested)&#8221; I haven&#8217;t done a lot of testing of this code yet. I don&#8217;t actually anticipate that there will be issues &#8212; really all I did was refactor the code into two classes instead of one &#8212; but that doesn&#8217;t mean there won&#8217;t be any issues, of course. =) If you&#8217;re interested, and especially if you&#8217;re one of the people who&#8217;s asked for this support, I would love it if you try it out and let me know how it works for you. If you&#8217;re willing to test it out, I&#8217;ll be happy to quickly make any fixes necessary.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2009/02/27/actionscript-gzip-library-flash-player-10/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Undo and redo in ActionScript textfields</title>
		<link>http://probertson.com/articles/2009/02/12/undo-and-redo-in-actionscript-textfields/</link>
		<comments>http://probertson.com/articles/2009/02/12/undo-and-redo-in-actionscript-textfields/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 17:29:14 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Elsewhere on the web]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Sites to remember]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=227</guid>
		<description><![CDATA[As I&#8217;ve mentioned I&#8217;ve been doing a lot of AIR database work, so I&#8217;ve been spending literally hours a day working in my AIR SQL query runner app. The good news is that means I&#8217;ve been finding/fixing bugs and adding features!
One thing I&#8217;ve been wishing for the last week or so is undo/redo functionality as [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve <a href="/articles/2009/01/26/updates-to-doppler-air-sql-query-testing-tool/">mentioned</a> I&#8217;ve been doing a lot of AIR database work, so I&#8217;ve been spending literally hours a day working in my <a href="/projects/doppler-air-sql-admin-tool/">AIR SQL query runner</a> app. The good news is that means I&#8217;ve been finding/fixing bugs and adding features!</p>
<p>One thing I&#8217;ve been wishing for the last week or so is undo/redo functionality as I&#8217;m editing query text. Coincidentally, I just found out that <a href="http://jacwright.com/blog/">my 360|Flex friend Jac Wright</a> has written <a href="http://code.google.com/p/undo-textfields/">a library for undo and redo in Flash Player (ActionScript) text fields</a>. The previous link is to the Google Code project; here&#8217;s his <a href="http://jacwright.com/blog/112/undo-redo-for-all-textfields/">introductory blog post about the &#8220;undo textfields&#8221; library</a>. (via <a href="http://www.xtyler.com/code/163">Tyler Wright</a> via <a href="http://www.flexstuff.co.uk/">Gilles Guillemin</a>/Twitter)</p>
<p>Admittedly I haven&#8217;t tried this yet, and I&#8217;ve asked whether it&#8217;s been tested in AIR so I don&#8217;t know whether it will actually be feasible as-is. But I&#8217;ve got my fingers crossed! =)</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2009/02/12/undo-and-redo-in-actionscript-textfields/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash Player 10/Flash CS4 documentation now available</title>
		<link>http://probertson.com/articles/2008/10/14/flash-player-10-flash-cs4-documentation/</link>
		<comments>http://probertson.com/articles/2008/10/14/flash-player-10-flash-cs4-documentation/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 17:49:10 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[Elsewhere on the web]]></category>
		<category><![CDATA[Life at Adobe]]></category>
		<category><![CDATA[Pixel Bender]]></category>
		<category><![CDATA[Sites to remember]]></category>
		<category><![CDATA[Vector (typed arrays)]]></category>
		<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=202</guid>
		<description><![CDATA[Why haven't I written anything in a while? Well, I've written lots -- just not on this site! The final Flash Player 10 and Flash CS4 documentation is out the door and live on the web. Here I've listed my favorite parts and some top-level links to help you get started with the new features in Flash Player 10.]]></description>
			<content:encoded><![CDATA[<p>(or, &#8220;why I haven&#8217;t written anything new here in a looong time&#8221;)</p>
<p>Like so many people, my work goes in cycles (from &#8220;busy&#8221; to &#8220;crazy&#8221; to &#8220;desperate crunch&#8221;). If you&#8217;re someone who follows this site (if in fact there is anybody who does), you may have figured out that any time I go for a long time without posting, it means I&#8217;m near the end of a project (and consequently, that new documentation is coming soon).</p>
<p>Well, that time has arrived. With the public announcement of Adobe Creative Suite 4, we&#8217;re doing something different in terms of the schedule for releasing documentation. This time the documentation has been released ahead of time, before the product actually ships. (Primarily for the sake of search engine indexing &#8212; but hey, let&#8217;s not complain.)</p>
<p>Of course, a draft version of the Flash Player 10 language reference has been around <a href="/articles/2008/05/21/flash-player-10-documentation-available-on-labs/">for a while now</a>, but if you haven&#8217;t had a chance to take a look (or if you want to know how things turned out in their final form), you can now view <a href="http://help.adobe.com/en_US/Flash/10.0_Welcome/WSC6B89A38-F236-4cb9-9D15-91A7BEC35EBF.html">the final Flash CS4 (including ActionScript for Flash Player 10) documentation</a>. Also, this includes several significant additions to the content in Programming ActionScript 3.0, so if you prefer to learn by reading about a topic rather than by piecing things together from the reference, then you&#8217;ll find this content useful.</p>
<p>Here are a few top-level links to get you started:</p>
<ul>
<li><a href="http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/">Programming ActionScript 3.0</a></li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/">ActionScript 3.0 Language and Components reference</a></li>
<li><a href="http://help.adobe.com/en_US/Flash/10.0_UsingFlash/index.html">Using Flash</a> (including <a href="http://help.adobe.com/en_US/Flash/10.0_UsingFlash/WS9F717870-8AED-438d-B324-44ACCE6871E8a.html">what&#8217;s new in Flash CS4</a>)</li>
</ul>
<p>Just for fun, here is the new content that I wrote:</p>
<ul>
<li>
<p>Vector class (strongly-typed arrays):</p>
<ul>
<li><a href="http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7fdc.html">Vector class in Programming ActionScript 3.0</a> (new content is interspersed with the previous content on the Array class)</li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/Vector.html">Vector class reference</a></li>
</ul>
</li>
<li>
<p>Pixel Bender (&#8220;custom filters&#8221; &#8212; although it&#8217;s a lot more than filters)</p>
<ul>
<li><a href="http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS3E659D01-10C0-479d-8175-B40950BBC223.html">Working with Pixel Bender shaders (in Programming ActionScript 3.0)</a> - plus other sections that are linked to from there, about using a shader as a drawing fill, a filter, a blend mode, etc.</li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Shader.html">Shader class reference</a></li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/ShaderJob.html">ShaderJob class reference</a></li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/ShaderParameter.html">ShaderParameter</a> and <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/ShaderInput.html">ShaderInput</a> class references</li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/filters/ShaderFilter.html">ShaderFilter class</a></li>
<li>plus new content in the <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/DisplayObject.html">DisplayObject class</a>, the <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/BlendMode.html">BlendMode class</a>, the <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Graphics.html">Graphics class</a>, etc.</li>
</ul>
</li>
</ul>
<p>And here are some of the other new topics that I think are the most interesting:</p>
<ul>
<li><a href="http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WSF24A5A75-38D6-4a44-BDC6-927A2B123E90.html">Working in three dimensions (3D) in Programming ActionScript 3.0</a></li>
<li><a href="http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS33C39F6A-19F1-4848-A0F8-A3604A000067.html">Inverse Kinematics (IK) in Programming ActionScript 3.0</a></li>
<li><a href="http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WSE06FE962-09BE-4460-B020-5CDC2E54C499.html">Using the new drawing api (aka &#8220;drawing api 2&#8221;) in Programming ActionScript 3.0</a></li>
</ul>
<p>So, what&#8217;s next for me? (Thanks for asking!) Since finishing the final versions of the Flash CS4 documentation, I&#8217;ve been working on some &#8220;quick start&#8221; articles around the new features. Those articles will appear in the <a href="http://www.adobe.com/devnet/flash/quickstart/">Flash developer center</a> soon &#8212; probably when Flash CS4 actually ships. (I&#8217;ve done one on the Vector class and one on the new FileReference functionality for accessing local files without a server round trip. Other colleagues have done cool things with dynamically generating audio and Pixel Bender &#8212; so I think it&#8217;ll definitely be worth a look.) Along with that, I&#8217;m working on new features for the next version of Adobe AIR. I also have <a href="/projects/">a few side projects</a> that I&#8217;ve been trying to make progress on as I can sneak in a minute here and there.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2008/10/14/flash-player-10-flash-cs4-documentation/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Flash Player 10 documentation available on labs</title>
		<link>http://probertson.com/articles/2008/05/21/flash-player-10-documentation-available-on-labs/</link>
		<comments>http://probertson.com/articles/2008/05/21/flash-player-10-documentation-available-on-labs/#comments</comments>
		<pubDate>Wed, 21 May 2008 18:08:05 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles to remember]]></category>
		<category><![CDATA[Elsewhere on the web]]></category>
		<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=173</guid>
		<description><![CDATA[Lee Brimelow has just pointed out that the Flash Player 10 documentation is available for download on Adobe Labs. I&#8217;m excited that this is public, so I can start talking about it more &#8212; I&#8217;ve been working on the documentation for several months now =)
On a personal note, the screenshot that Lee posted for the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://theflashblog.com/">Lee Brimelow</a> has just pointed out that the Flash Player 10 documentation is <a href="http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_as3langref_052008.zip">available for download</a> on Adobe Labs. I&#8217;m excited that this is public, so I can start talking about it more &#8212; I&#8217;ve been working on the documentation for several months now =)</p>
<p>On a personal note, the <a href="http://theflashblog.com/?p=387">screenshot that Lee posted for the Vector class documentation</a> was written by me. So that was fun to see =)</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2008/05/21/flash-player-10-documentation-available-on-labs/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New ActionScript unit testing framework</title>
		<link>http://probertson.com/articles/2008/05/01/new-actionscript-unit-testing-framework/</link>
		<comments>http://probertson.com/articles/2008/05/01/new-actionscript-unit-testing-framework/#comments</comments>
		<pubDate>Fri, 02 May 2008 03:58:09 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Elsewhere on the web]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Sites to remember]]></category>
		<category><![CDATA[Unit testing]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=172</guid>
		<description><![CDATA[Back in November 2005 (yes, 2.5 years ago!) I wrote an article about how data types and type checking work in ActionScript. ActionScript is different than many languages, in that the ActionScript compiler can be used for compile-time type checking (or not), and at runtime it is a strongly typed language, but it also has [...]]]></description>
			<content:encoded><![CDATA[<p>Back in November 2005 (yes, 2.5 years ago!) I wrote <a href="/articles/2005/11/08/actionscript-3-unit-testing-recommended/">an article about how data types and type checking work in ActionScript</a>. ActionScript is different than many languages, in that the ActionScript compiler can be used for compile-time type checking (or not), and at runtime it is a strongly typed language, but it also has features of dynamically typed languages. This allows for some flexibility but also means that you have to be careful about testing your code (because the compiler won&#8217;t always catch everything).</p>
<p>My conclusion (not original by any means) was that unit testing is an important tool for ActionScript developers. I&#8217;ve tried a couple of ActionScript unit testing frameworks (<a href="http://www.asunit.org/">ASUnit</a> and <a href="http://code.google.com/p/as3flexunitlib/">FlexUnit</a>). And finally getting to the point of this post, I was interested to learn today that the crew at <a href="http://www.digitalprimates.net/">Digital Primates</a> is releasing <a href="http://code.google.com/p/dpuint/">an open source unit testing framework for Flex, known as &#8220;dpunit&#8221;</a>.</p>
<p>(via <a href="http://jessewarden.com/">Jesse Warden</a> via <a href="http://twitter.com/jesterxl">Twitter</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2008/05/01/new-actionscript-unit-testing-framework/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Open Source Flex Visual Graph Library</title>
		<link>http://probertson.com/articles/2008/04/02/open-source-flex-visual-graph-library/</link>
		<comments>http://probertson.com/articles/2008/04/02/open-source-flex-visual-graph-library/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 17:25:40 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Elsewhere on the web]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Sites to remember]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2008/04/02/open-source-flex-visual-graph-library/</guid>
		<description><![CDATA[A couple of months ago at a SilvaFUG meeting I saw a demo of some graph visualization libraries &#8212; the kind of thing you use to create a graph showing nodes linked together according to various relationships.
The current &#8220;favorite&#8221; is the Flex Visual Graph Library (FVGL) Open Source Project.
Their Visual Graph explorer sample gives a [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of months ago at a <a href="http://silvafug.org/">SilvaFUG</a> meeting I saw a demo of some graph visualization libraries &#8212; the kind of thing you use to create a graph showing nodes linked together according to various relationships.</p>
<p>The current &#8220;favorite&#8221; is the <a href="http://code.google.com/p/flexvizgraphlib/">Flex Visual Graph Library (FVGL) Open Source Project</a>.</p>
<p>Their <a href="http://flexvizgraphlib.googlecode.com/svn/trunk/vgExplorer/bin/VGExplorer.html">Visual Graph explorer sample</a> gives a nice overview of the functionality that&#8217;s available.</p>
<p>Anyway, I forgot to note this earlier, so I&#8217;m adding it now, though there&#8217;s a good chance this isn&#8217;t news to anyone who&#8217;s interested in this sort of thing.</p>
<p>(via email from <a href="http://www.onflex.org/ted/">Ted Patrick</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2008/04/02/open-source-flex-visual-graph-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Strongly typed arrays &#8212; coming to ActionScript near you</title>
		<link>http://probertson.com/articles/2008/03/28/vector-as3-strongly-typed-arrays-redux/</link>
		<comments>http://probertson.com/articles/2008/03/28/vector-as3-strongly-typed-arrays-redux/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 21:35:52 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2008/03/28/vector-as3-strongly-typed-arrays-redux/</guid>
		<description><![CDATA[I&#8217;ve been wanting to have strongly typed arrays in ActionScript for a long time. I was pretty excited when I read that it&#8217;s part of the EcmaScript 4th edition specification (in the form of the Vector class), and much more excited when I heard that the Vector class is being included in Flash Player &#8220;Astro&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been wanting to have strongly typed arrays in ActionScript <a href="/articles/2005/03/17/strongly-typed-arrays/">for a long time</a>. I was pretty excited when I read that it&#8217;s part of the <a href="http://wiki.ecmascript.org/">EcmaScript 4th edition</a> specification (in the form of <a href="http://wiki.ecmascript.org/doku.php?id=proposals:vector">the Vector class</a>), and <em>much</em> more excited when I heard that the Vector class is being included in Flash Player &#8220;Astro&#8221; (as <a href="http://www.zeuslabs.us/2008/02/25/live-from-360flex-day-one/">announced</a> <a href="http://ech.net/blog/2008/02/26/360flex-atlanta-day-one-impressions/">at 360 Flex Atlanta</a> by Matt Chotin).</p>
<p>Since the majority of the time when someone&#8217;s using an Array in ActionScript, they really want all the elements to be the same type anyway, this is a really great addition and I think it will be used heavily. The Vector class allows (requires) you to specify the type it will contain at compile time &#8212; both for variable declarations and when creating instances. In both cases the syntax you use is a &#8220;type parameter&#8221; suffix <code>.&lt;T&gt;</code>:</p>
<pre><code>var names:Vector.&lt;String&gt; = new Vector.&lt;String&gt;();</code></pre>
<p>The type parameter syntax is part of a separate EcmaScript 4th edition proposal. Sadly they couldn&#8217;t make the syntax identical to that for generics in C# (and I believe Java does it the same way), which is almost the same but without the initial <code>.</code> (period). (For an interesting read, take a look at <a href="http://wiki.ecmascript.org/doku.php?id=discussion:type_parameters#the_bracket_issue">the history of the various options the committee members considered for representing type parameters</a>.)</p>
<p>Anyway, because you specify the type at compile time, the idea is that the compiler can do the type checking for you for adding and getting elements from a Vector instance. In addition, since using Array (and the runtime type checking and type casting that array access involves) has always been a bottleneck in ActionScript performance, I expect that performance improvements can be expected. (Okay, I&#8217;ve heard anecdotal reports around the office of <em>much</em> better performance for Vector than for Array.)</p>
<p><a href="http://blogs.adobe.com/fcheng/">Francis Cheng</a> (who&#8217;s on the EcmaScript committee) has a couple of nice articles about the  <a href="http://blogs.adobe.com/fcheng/2008/02/vectors.html">Vector class</a> and <a href="http://blogs.adobe.com/fcheng/2008/02/type_parameters_in_ecmascript.html">type parameters</a>, so I won&#8217;t bother recreating everything he&#8217;s written. Definitely worth a read (like everything he writes).</p>
<p>As an (almost) final note, I should point out that I haven&#8217;t seen anything indicating that type parameters will be generally available in &#8220;Astro&#8221; &#8212; just Matt&#8217;s announcement about the Vector class specifically.</p>
<p>And finally, on a personal note, I&#8217;m excited because I get to do the documentation for the Vector class. It&#8217;s always fun getting to write about new features that are personally valuable. And this is one that I&#8217;ve definitely been interested in for a while!</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2008/03/28/vector-as3-strongly-typed-arrays-redux/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>New blog on ActionScript internals and future</title>
		<link>http://probertson.com/articles/2008/02/12/new-blog-on-actionscript-internals-and-future/</link>
		<comments>http://probertson.com/articles/2008/02/12/new-blog-on-actionscript-internals-and-future/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 19:30:02 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Elsewhere on the web]]></category>
		<category><![CDATA[Sites to remember]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2008/02/12/new-blog-on-actionscript-internals-and-future/</guid>
		<description><![CDATA[A co-worker and friend of mine, Francis Cheng, recently started a new blog that I wanted to share:
http://blogs.adobe.com/fcheng/
Francis is a former engineer on the Flash Authoring team (and before that, a lawyer). He&#8217;s been in his current position on the ActionScript documentation team for several years. He&#8217;s also one of Adobe&#8217;s representatives on the ECMAScript [...]]]></description>
			<content:encoded><![CDATA[<p>A co-worker and friend of mine, Francis Cheng, recently started a new blog that I wanted to share:</p>
<p><a href="http://blogs.adobe.com/fcheng/">http://blogs.adobe.com/fcheng/</a></p>
<p>Francis is a former engineer on the Flash Authoring team (and before that, a lawyer). He&#8217;s been in his current position on the ActionScript documentation team for several years. He&#8217;s also one of Adobe&#8217;s representatives on the ECMAScript language committee, so he&#8217;s got a better idea than anyone else I know of the internals and future of the core ActionScript language.</p>
<p>So far his posts have been really great if, like me, you&#8217;re interested in knowing more about the less-used features of ActionScript and also getting an early look at new features that will probably be in future versions of ActionScript.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2008/02/12/new-blog-on-actionscript-internals-and-future/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating more secure SWF applications</title>
		<link>http://probertson.com/articles/2008/01/03/creating-more-secure-swf-applications/</link>
		<comments>http://probertson.com/articles/2008/01/03/creating-more-secure-swf-applications/#comments</comments>
		<pubDate>Thu, 03 Jan 2008 23:02:45 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Application Design]]></category>
		<category><![CDATA[Articles to remember]]></category>
		<category><![CDATA[Elsewhere on the web]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2008/01/03/creating-more-secure-swf-applications/</guid>
		<description><![CDATA[If you&#8217;re like me and you&#8217;ve been heads-down in work or just getting through the pre/post-Christmas season, you may have missed the article &#8220;Creating more secure SWF web applications&#8221; by Peleus Uhley, that was posted on the Adobe Developer Center on Dec. 20.
In spite of the bad timing, it&#8217;s a nice, thorough article that gives [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like me and you&#8217;ve been heads-down in work or just getting through the pre/post-Christmas season, you may have missed the article &#8220;<a href="http://www.adobe.com/devnet/flashplayer/articles/secure_swf_apps.html">Creating more secure SWF web applications</a>&#8221; by Peleus Uhley, that was posted on the Adobe Developer Center on Dec. 20.</p>
<p>In spite of the bad timing, it&#8217;s a nice, thorough article that gives a good view of things that we can do to make our apps more secure, in addition to security updates that Adobe continues to make to Flash Player.</p>
<p>(via email from Jeff Swartz)</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2008/01/03/creating-more-secure-swf-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
