4
Contents
CHAPTER 3:
Write Scripts with ActionScript
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Set up your workspace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Create an instance of a symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Name button instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Initialize the document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
About ActionScript syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Locate ActionScript reference documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Add comments to ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Write a function for a button. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Copy and modify a button function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Check syntax and test your application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
CHAPTER 4:
Create an Application
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Set up your workspace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Copy input and dynamic text fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Name text fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Add and name a Button component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Declare variables and values for the prices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Specify values for input text fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Write a function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Write an event handler for the component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Test your application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
CHAPTER 5:
Work with Layers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Set up your workspace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Select a layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Hide and show layers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Lock a layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Add and name a layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Change the order of layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Organize layers in a folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Add a mask layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Add a guide layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Delete a layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
CHAPTER 6:
Create a User Interface with Layout Tools
. . . . . . . . . . . . . . . . . . . 47
Set up your workspace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Use guides to align an object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Change the Stage size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Resize objects to match the Stage size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Specify snap alignment settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Align an object using the alignment guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Align objects using the Align panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Snap objects to each other . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Summary of Contents for FLASH MX 2004-LEARNING FLASH
Page 1: ...Learning Flash...
Page 8: ...8 Contents...
Page 34: ...34 Chapter 3 Write Scripts with ActionScript...
Page 54: ...54 Chapter 6 Create a User Interface with Layout Tools...
Page 62: ...62 Chapter 7 Draw in Flash...
Page 68: ...68 Chapter 8 Create Symbols and Instances...
Page 76: ...76 Chapter 9 Add Animation and Navigation to Buttons...
Page 104: ...104 Chapter 13 Add Interactivity with ActionScript...
Page 112: ...112 Chapter 14 Create a Form with Conditional Logic and Send Data...
Page 122: ...122 Chapter 15 Work with Objects and Classes Using ActionScript 2 0...