| By Darron J. Schall | Article Rating: |
|
| July 21, 2006 12:30 PM EDT | Reads: |
15,930 |
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.
Published July 21, 2006 Reads 15,930
Copyright © 2006 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
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.
![]() |
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... |
||||
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Cloud Executives Feature on Cloud Computing Expo Power Panel
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Adobe Reader Sued
- Adobe Unveils LiveCycle Enterprise Suite 2 for Deployment in the Cloud
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Ph.D. in Twitter Anyone?
- Adobe Flex Developer Earns $100K in New York City
- Eolas Sues the Internet
- Adobe LiveCycle Enterprise Suite 2 for Cloud Computing
- Special Report on the Emerging Cloud Computing Trend
- My Thoughts on Ulitzer
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Ulitzer Live! New Media Conference & Expo
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Eval JavaScript in a Global Context
- Fig Leaf Software to Exhibit at Government IT Conference & Expo
- Cloud Executives Feature on Cloud Computing Expo Power Panel
- Software Flexibility in the Cloud - Part 4 of 5
- Is Microsoft as Free as Open Source?
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Adobe Reader Sued
- Adobe Unveils LiveCycle Enterprise Suite 2 for Deployment in the Cloud
- Where Are RIA Technologies Headed in 2008?
- Cover Story: How to Increase the Frame Rates of Your Flash Movies
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Your First Adobe Flex Application with a ColdFusion Backend
- Adobe Flex 2: Advanced DataGrid
- i-Technology Blog: Death-Knell For "Rich Media? Hardly!
- Adobe/Macromedia - Microsoft, Look Out!
- How To Create a Photo Slide Show ...
- Adobe Flex Interface Customization - Themes, Styles, Skins
- Personal Branding Checklist
- Has the Technology Bounceback Begun?
- "Real-World Flex" by Adobe's Christophe Coenraets




































