Migrate ActionScript 1.0 to ActionScript 2.0
The shift from ActionScript 1.0 to ActionScript 2.0 is not a difficult one. In fact, most of what works in ActionScript 1.0 will work exactly the same in ActionScript 2.0. Afterall, once compiled, they create essentially the same bytecode that is interpreted by the player. Though ActionScript 2.0 contains a new syntax for creating classes, the older ActionScript 1.0 style for defining classes will still function making the ActionScript 2.0 syntax optional (though no-less beneficial). Same applies to strict data typing. This is a feature of ActionScript 2.0 that helps with the debugging process but is completely optional.
What is often one of the biggest issues when migrating from ActionScript 1.0 to ActionScript 2.0 is actually making the jump from targeting Flash Player 5 or earlier to Flash Player 6 or greater since Flash Player 6 is the lowest version of Flash Player supported by ActionScript 2.0. If you have ActionScript 1.0 code that targets Flash Player no less than 6, you should be able to switch over to ActionScript 2.0 without changing a single line of code.
To take full advantage of ActionScript 2.0, however, you will want to take advantage of its features and port your existing ActionScript 1.0 code to make use of them. This means converting ActionScript 1.0 classes to use the new class syntax and assigning variable types to variables where appropriate.
Key Points
- ActionScript 2.0 is essentially ActionScript 1.0
- ActionScript 1.0 will work if compatible with Flash Player 6.0
- Migrating ActionScript 1.0 to 2.0 usually means taking advantage of the new features of ActionScript 2.0
- Strict data typing
- New class syntax
