
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
136
|
Chapter 5: Authoring an ActionScript 2.0 Class
Even though ActionScript 2.0 is compiled to the same bytecode as
ActionScript 1.0 and nearly 100% of ActionScript 2.0 constructs are
supported by Flash Player 6, .swf files must be exported in Flash Player
6 format to work properly in Flash Player 6. See Chapter 1.
To change imageViewer.fla’s export settings to support playback in Flash Player 6,
follow these steps:
1. Choose File
➝ Publish Settings.
2. On the Flash tab of the Publish Settings dialog box, select Flash Player 6 as the
Version option.
3. Click OK.
Once the version is set to Flash Player 6, any .swf file exported from imageViewer.fla
(via File
➝ Publish, Control ➝ Test Movie, or File ➝ Export ➝ Export Movie) will
work in Flash Player 6. ActionScript 2.0 is not supported in Flash Player 5 or older,
no matter what the format of the .swf file.
Preloading the ImageViewer Class
Wasn’t it great to see the ImageViewer class in action? But there’s a minor problem.
Right now the ImageViewer class is so tiny you’ll hardly notice it loading. However,
if it were, say, 50 KB or 100 KB, you’d notice a delay when loading it over a slow
connection. By default, all classes load before frame 1 is displayed, causing a delay
before a movie can start. If the load time is long enough, a movie will ...