You are currently browsing the Eric Feminella blog archives for January, 2006

FLEX 2.0 beta and ActionScript 3.0

I have been spending the majority of my free time building sample applications in the pre-release of Flex 2.0 beta learning ActionScript 3.0.

For those of you who haven’t yet had the chance to installed the alpha of Flex 2.0, let me tell you that you are missing out on some of the best advances in RIA technology around.

ActionScript 3.0 is ideal for Object Oriented Programmers like myself to use. Definetly a step in the right direction and Macromedia / Adobe have built on the OOP nature of ActionScript 2.0 greatly.

Though different in many ways from ActionScript 2.0, ActionScript 3.0 has many new features which are obviously much to vast to get into in this post but I will elaborate on what I have found so far to be the most impressive:

  • Automatic code hinting for classes, packages and members of user defined classes.
  • Strict datatyping
  • Package definitions (You now use a package statement rather than dot notation syntax to declare classes inside packages)
  • init and unit classes for whereever a decimal isn’t needed – int is great for loop counters
  • public and internal access specifiers
  • flash.util.Proxy (this allows you to control what happens when any member of a class is accessed
  • New XML class that implements the XML for ECMAScript (E4X) functionality. No more recursive looping!
  • Code collapse
  • Sound.computeSpectrum() method of the sound class (this method accurately returns an array containing 512 normalized values representing the audio file that is playing. You can use these values to make an accurate EQ but even more so you can use these values to controlanimation or just about anything else that you can think of.

These are just a few of the new features that I am happy to see. There are so many new features that I will have to learn them before I can comment. Beware that there have been many changes and alot of AS2.0 methods and properties have been either changed or deprecated all together.

I will post some of my sample migration from ActionScript 2.0 to ActionScript 3.0 applications as well as the port code to my portfolio site next week.

- Eric

FLEX 2.0 Beta Pre-Release

I got some insider info on the official release of FLEX 2.0 beta. My company is partners with Macromedia so luckily for my team and I we have access to the Beta section of Macromedia.com and all pre-release betas so I plan to spend most of my weekend in Flex 2.0. The new beta will be available for download soon. How soon I don’t know specifically but I have been told that I will have access to it very soon. I’ll write more as this develops.

Alternative IDE’s for outputting Flash content

I have been experimenting with some alternative IDE’s for compiling Flash content. One alternative that is definetly worth taking a look at is MTASC, which is a commandline compiler and also happens to be the first ActionScript 2.0 Open Source compiler. Check it out at: http://www.mtasc.org.

You can use MTASC in Sepy for syntax checking and compiling. Sepy is extreamly useful as I was using it for awhile a few months back and just recently started using it again. Check it out at www.sephiroth.it.

Also, be sure to check out FDT

Working with AJAX and DOM

This week I have been building test applications using AJAX (Asynchronous JavaScript and XML). AJAX is very simular to Microsoft’s Remote Scripting. The biggest feature is the XMLHttpRequest object in JavaScript which handles communication between the client and server.

Working in Flex 1.5

These past few weeks I have been building applications leveraging the Flash Platform as a whole – Flash, Flex and ActionScript. I have been spending the majority of my time at work in Flex Builde working with mxml, and ActionScript 2.0 of course.

In short, I am very excited about the upcoming release of ActionScript 3.0 in Flex 2.0 as well as Flash Player 9, due to be released this spring.

E4X

I am quite sure the majority of readers who are Flash Platform Developers are familiar with parsing XML documents in ActionScript 2.0. And though it is fun to do and most of us already have plenty of AS 2.0 parsing utilities such as XMLSA, in reality it is quite cumbersome to say the least.

Welcome to E4X, quite simply ECMAScript for XML (E4X), and in my opinion this is the what has been needed all along. I have written many APIs which convert XML objects to strongly type data structures, similar in some ways to how mxml is converted to native ActionScript objects at compiletime in Flex. This may be appropriate for certain applications but when it comes to just parsing a document E4X makes much more since. What E4X does is incredibly simple and logical. Since the XML document is contained inside an XML object you then have access to all of it’s properties, which are nothing more than the documents nodes, attributes, namespaces etc.

ActionScript 3.0 will have support for this new standard which we can take advantage of without having to worry about the limitations of most browsers at the moment since none of the mainstream browsers are currently supporting E4X. Check out www.ecma-international.org to learn more.