Welcome!

Adobe Flex Authors: Yakov Fain, Keith Swenson, Jacques Durand, Pat Romanski, Liz McMillan

Related Topics: Adobe Flex, Java, ColdFusion

Adobe Flex: Article

The Future of ActionScript

Because ActionScript is ECMAScript standard, anything that happens in ECMAScript will happen in ActionScript

This month Darron's Diary looks at an Iterator implementation, at ECMAScript 4, and previews his own latest book

A Simple ActionScript 3 Iterator Implementation
I was looking for an Iterator implementation in ActionScript 3 to avoid reinventing the wheel for the umpteenth time but couldn't find one on Google, so I whipped one up quick that you can download here: (www.darronschall.com/downloads/as3_iterator.zip.

This should save someone a full 3 minutes of work in the future....

Usage is pretty simple and straightforward. The download includes the Iterator interface as well as a simple implementation of ArrayIterator for iterating over an array of elements:

import com.darronschall.util.*;

var arr:Array = [1, 2, 3];
var it:Iterator = new ArrayIterator( arr );
while ( it.hasNext() )
{
      trace( it.next() ); // 1, 2, 3
}

var it2:Iterator = new ArrayIterator( null );
trace( it2.hasNext() ); // false

You can use this code without restriction under the MIT License: http://en.wikipedia.org/wiki/MIT_License.

The Future of ActionScript
Want to get an idea of what ActionScript might look like in the future? The ECMAScript committee has released a handful of public resources (http://lambda-the-ultimate.org/node/1543) surrounding ECMAScript 4. These resources give a general idea of where the language is headed.

Because ActionScript is based on the ECMAScript standard, anything that happens in ECMAScript will almost certainly happen in ActionScript too. Not to mention, quite a few of the Adobe folks are on the ECMAScript committee...

Read more at http://developer.mozilla.org/es4/ (most of the good stuff is in the proposals section).

ActionScript 3 Cookbook
My first book project is nearing completion, the ActionScript 3.0 Cookbook. Sub-titled "Solutions and Examples for Flash Developers," it is a joint venture by Joey Lott, Keith Peters and myself. It looks like it's scheduled to be released on August 1, 2006. I can hardly wait.

More Stories By Darron J. Schall

Darron J. Schall, an Editorial Board member of Web Developer's & Designer's Journal, has been programming long before he could drive. In school he studied programming languages, ranging from Basic to Pascal to C++ and eventually moving into Java and C# throughout college. Somewhere in the middle he got hooked on Flash 5 and it's been a crazy love affair ever since. Darron is an independent consultant specializing in RIA development. He maintains a Flash Platform related weblog (www.darronschall.com) and is an active voice in the Flash and Flex communities.

Comments (4) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
news desk 07/21/06 12:36:01 PM EDT

This month Darron's Diary looks at an Iterator implementation, at ECMAScript 4, and previews his own latest book. Because ActionScript is based on the ECMAScript standard, anything that happens in ECMAScript will almost certainly happen in ActionScript too. Not to mention, quite a few of the Adobe folks are on the ECMAScript committee...

news desk 07/21/06 12:26:36 PM EDT

This month Darron's Diary looks at an Iterator implementation, at ECMAScript 4, and previews his own latest book. Because ActionScript is based on the ECMAScript standard, anything that happens in ECMAScript will almost certainly happen in ActionScript too. Not to mention, quite a few of the Adobe folks are on the ECMAScript committee...

news desk 07/21/06 12:11:24 PM EDT

This month Darron's Diary looks at an Iterator implementation, at ECMAScript 4, and previews his own latest book. Because ActionScript is based on the ECMAScript standard, anything that happens in ECMAScript will almost certainly happen in ActionScript too. Not to mention, quite a few of the Adobe folks are on the ECMAScript committee...

news desk 07/21/06 11:39:56 AM EDT

This month Darron's Diary looks at an Iterator implementation, at ECMAScript 4, and previews his own latest book. Because ActionScript is based on the ECMAScript standard, anything that happens in ECMAScript will almost certainly happen in ActionScript too. Not to mention, quite a few of the Adobe folks are on the ECMAScript committee...