
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Sharing Classes Without Sharing Source Files
|
345
2. Create the following working directory for the Mega Bridal Depot project: c:\
data\spiderservices\megabridaldepot.
3. Create a new .fla file named mbd_home.fla in the following location: c:\data\spi-
derservices\megabridaldepot\mbd_home.fla.
4. Drag an instance of the spidercore component from the Components panel to
the Stage of mbd_home.fla.
5. Delete the instance you just dragged to the Stage. (The component is required in
the .fla file’s Library only, not on stage.)
6. Be sure never to change the Linkage settings for the component. The settings
should always be set to Export for ActionScript and Export in First Frame. To
change the frame on which the classes in the component are exported, use File
➝ Publish Settings ➝ ActionScript Version ➝ Settings ➝ Export Frame for
Classes.
7. On frame 1 of Layer 1 in mbd_home.fla, add the following code:
import com.spiderservices.effects.TextAnimation;
var textani:TextAnimation = new TextAnimation( );
8. Export a test .swf file from mbd_home.fla using Control ➝ Test Movie (Ctrl-
Enter on Windows or Cmd-Enter on Mac).
If you followed the preceding steps correctly, the Output panel should display:
Imagine a text effect with great majesty.
Creating a No-Source Runtime Class Library
Earlier in this chapter, ...