|
|
||||||||||
| Ultrashock Tutorials > Flash 8 > Alt Captions | ||||||||||
|
||||||||||
|
|
Alt Captions |
|
||||||||
Setting up the Flash fileLet’s start by making a new movie (File > New). Set the dimensions to 300x200 pixels with dark grey (#333333) as the background color.
Create a new movieclip (Insert > New Symbol) and draw a button size square inside.
Give this movieclip the instance name of “hotspot”.
Open up the movie Publish Settings panel (File > Publish Settings) and then click on Settings (next to the ActionScript version details). The ActionScript 2.0 Settings window should now be displayed. By adding a new class path we are telling Flash to look in the caption/actionscript folder for our soon-to-exist AS2 classes (the path is relative to the Flash file). Click on the big plus sign and then type in “actionscript” (without quotes) and hit the Enter key. The new class path is now added…
Open up the Actions panel (Window > Actions) and enter the following: var usCaption = new Caption("Visit Ultrashock.com", hotspot, 500); The Caption class will have 3 parameters, 2 of which are required. Parameter explanations as follows:
Go into the library panel (Window > Library) and select “New Font” from the options menu (shown below).
The Font Symbol Properties window should now be displayed. Enter the following settings:
Select the newly added font in the Library panel, and then go into the options menu like we did before, only this time select “Linkage”. Put “arial” as the identifier, check the “Export for ActionScript” box, and then hit enter.
Save the file (File > Save As) in the same directory as the actionscript folder. You can use any name you like as long as the file is placed within the base directory (caption/).
|
||||||||||
©2006 Ultrashock.com - All rights reserved |