Download presentation
Presentation is loading. Please wait.
Published byAshley Stafford Modified over 9 years ago
1
Copyright © 2003 Pearson Education, Inc. Chapter 4 – Slide 1 by Michael Kay The Web Wizard’s Guide to Flash
2
Copyright © 2003 Pearson Education, Inc. Chapter 4 – Slide 2 CHAPTER 4 Basic Actions
3
Copyright © 2003 Pearson Education, Inc. Chapter 4 – Slide 3 Chapter Objectives Introduce interactivity Add and test a simple frame action Create a button symbol and apply a play action Use other essential actions Learn to apply the Tell Target action to control movie clips Build a pull-down menu
4
Copyright © 2003 Pearson Education, Inc. Chapter 4 – Slide 4 The Role of Actions in Flash Allows non-linear play of Flash movies Gives audience some control over how the movie plays All actions are a form of ActionScript but these are easier to apply A user event is dependent on the interaction of a user (such as clicking a button). Movie events are triggered by the play of the movie (such as reaching a specific keyframe).
5
Copyright © 2003 Pearson Education, Inc. Chapter 4 – Slide 5 Frame Actions A frame action is a type of movie event. Select a keyframe and use the Actions panel to assign a frame action. Assign a Stop action to a specific keyframe and the movie will invariably stop there. Choose the Control > Test Movie command to check your actions.
6
Copyright © 2003 Pearson Education, Inc. Chapter 4 – Slide 6 Button Actions A button action allows you to assign a user event. Create a button symbol which invites the user to click on it. Place an instance of the button on the Stage. Assign an event handler and action. Add a button with a Play action to the same keyframe with the Stop action. This allows a user to continue the play of the movie.
7
Copyright © 2003 Pearson Education, Inc. Chapter 4 – Slide 7 Four Frames for a Button Symbol Up: What the button looks like with no interaction, at rest Over: What the button looks like when the mouse rolls over it Down: What the button looks like when someone clicks down on it Hit: Defines the area that responds to a mouse
8
Copyright © 2003 Pearson Education, Inc. Chapter 4 – Slide 8 A Few Mouse Events These actions define when the button will initiate another action Press: When the mouse clicks down on the button Release: After clicking down, when the mouse button is released. This is the most popular mouse event. Roll Over: When the mouse moves over the symbol instance
9
Copyright © 2003 Pearson Education, Inc. Chapter 4 – Slide 9 A Few More Basic Actions Go To: Jumps movie to a specified keyframe Get URL: Links to any web page Load Movie: Load a second Flash SWF file within the current movie.
10
Copyright © 2003 Pearson Education, Inc. Chapter 4 – Slide 10 The Tell Target Action It Tells a Target movie clip to perform an action A button in one location can contain an action to control a movie clip in another location Place an instance of a movie clip symbol on the Stage and assign a name to it Add a Tell Target to a button that targets the movie clip Nest another action within the Tell Target
11
Copyright © 2003 Pearson Education, Inc. Chapter 4 – Slide 11 Anatomy of a Tell Target Action Tell Target Action with Path Contains nested action such as Stop or Go To Appears like this in the Actions panel: tellTarget("animate_me") { stop(); }
12
Copyright © 2003 Pearson Education, Inc. Chapter 4 – Slide 12 Target Paths
13
Copyright © 2003 Pearson Education, Inc. Chapter 4 – Slide 13 Example Target Paths A target on the same level as the action: “Tree” A target nested one level within another object: “Tree/Apple” A target nested within that Apple: “Tree/Apple/Seed” Going up one level in the hierarchy: “../Orange” An absolute path is the same from anywhere: “_level0/Tree”
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.