While many design houses are delaying the transition for now, all roads lead to the Flash Platform as a complete development environment. Which means Flash Player 9… and more importantly, Actionscript 3.
If you find yourself questioning the drastic changes in Actionscript and Flash Player 9, there are several reasons why these changes needed to occur:
- Your designs were limited by the speed of the old flash player. The new virtual machine (AVM2) is many times faster. To achieve this level of performance, changes in the language were a must.
- Much of Actionscript code was throw-away code. Previous versions of Actionscript lent themselves to be constructed procedurally. This also created a tendency to rewrite the same code repetitively on subsequent projects. Code was littered throughout the timeline, making it difficult to debug.
- Code was inconsistent. The new syntax might seem foreign at first, but when you learn it once, it’s consistent. I’ll give an example below.
- Flexibility. You are no longer locked in to the Flash environment and plug-in. You can now develop desktop applications with Adobe Air, and choose from several development tools to build your Flash applications. These include Flex, and a free command-line compiler similar to those offered for C# and Java.
- Competition. There are many choices for designers and developers these days, and in order for Flash to avoid obsolescence , it needed to evolve and offer new tools and deployment options. Therefore, a modern, object-oriented language was imminent.
Over the next few weeks, I’ll introduce the basics of Actionscript 3 and object-oriented programming. Let’s look at a basic line of code and break it down.
var myTextField:TextField = new TextField();
- Var tells Flash that we’re creating a variable. A variable is just a space in memory that holds anything we want.
- myTextField is the name of the Variable we are creating. This can be anything you want, such as textFieldsRCool, or iLikePonies.
- :TextField is the type of variable we’re creating. In this case, it’s a TextField. It could be a movieclip, a number, or something we made up, as long as it is defined by a class (which we’ll discuss next week.)
- new TextField This actually creates an instance of a TextField. It could be anything in Flash’s library, or even your own. We’ll learn more about this next week when we discuss classes.
- () In these parenthesis we can pass arguments to the TextField, which can set its properties. These are empty because we’re not setting any properties now. We’re simply creating a new TextField called myTextField.
- ; The semicolon says “This is the end of the statement,” just like it always has.
If this seems a little confusing at first, remember that once it becomes clear, it works the same way with ANYTHING you’re trying to do. Next week we’ll look at classes, and do some stuff to our new textfield.




