Title: Adobe Photoshop 7.0 Design Professional
1(No Transcript)
2Unit Lessons
OVERVIEW
- Work with actions
- Work with targets and movie clip symbols
- Create interactive movie clip symbols
- Define variables
3Using Basic ActionScript
INTRODUCTION
- Use ActionScript
- To create interactive movies
- To add actions to a frame, button, or movie clip
symbol
4Work with Actions
LESSON 1
- Use ActionScript and frame labels to create
navigation to specific frames on the timeline - Work in expert mode in the Actions panel
5Referencing the Timeline in Actions
LESSON 1
- Use a frame number or frame label to reference
the timeline in actions - A frame label is a text name for a keyframe
- Add a label to a frame using the Frame Property
inspector
6A Frame Label
LESSON 1
- A small red flag appears in labeled frames
7Creating A Frame Label
LESSON 1
- Specify name of the frame label
8Actions Panel in Expert Mode
LESSON 1
9Adding an Action in Expert Mode
LESSON 1
10Using the Actions Panel in Expert Mode
LESSON 1
- Display the Actions panel in expert mode
- To write ActionScript directly in the Script pane
- To select action names from the Actions toolbox
- To copy and paste actions in the Script pane
11Exercise
LESSON 1
- Need fli_1.fla
- Labeling frames pages I-6 I-9
12Work with Targets and Movie Clip Symbols
LESSON 2
- Use ActionScript to control movie clip timelines
- Use ActionScript to control the timeline of a
nested movie clip symbol - Copy ActionScript between objects in expert mode
13Working with Movie Clips
LESSON 2
- Creating actions that run a specific frame within
the movie clip symbols timeline - Making a movie clip draggable
14Naming a Movie Clip Symbol Instance
LESSON 2
Type the name in this field
15Working with Movie Clips
LESSON 2
- Movie clips and other objects have
- Name
- Properties
- _x, _y positions
- _xscale, _yscale scale
- _alpha alpha property
- Main time line is always called _root
- _root._xmouse, _root._ymouse
- _root._currentFrame
16Working with Movie Clips (cont.)
LESSON 2
- Movie clips react to events
- on (press), on(release)
- When mouse is pressed or released on them
- onClipEvent (load)
- onClipEvent (mouseDown) or mouseUp
- onClipEvent (enterFrame)
- Every time the clip enters a frame
- Buttons react to events
- on (release), on (press)
17Exercise
LESSON 2
- Create a ball, two text boxes (dynamic text) and
name them, motion tween the ball from left to
right - Show _x, _y, and _currentFrame
- Create a ball
- Place the ball wherever the mouse moves
- _root._xmouse, _root._ymouse
- Increase the size of the ball
- Decrease the alpha of the ball
18Referencing Movie Clip Symbols as ActionScript
Targets
LESSON 2
- To control movie clip symbols and their timelines
with ActionScript, target the movie clips - In normal mode, use the with action
- In expert mode, use dot syntax
19Insert Target Path Dialog Box
LESSON 2
Movie clip symbols nested inside the dragonfly
movie clip
20ActionScript Statement Using Dot Syntax
LESSON 2
Dot syntax statement referring to a nested movie
clip symbol
21Exercise
LESSON 2
- Need fli_2.fla
- Target movie clips pages I-12 I-17
22Create Interactive Movie Clip Symbols
LESSON 3
- Use ActionScript
- To make a movie clip draggable
- To change the properties of a movie clip based on
user actions
23Understanding InteractiveMovie Clips
LESSON 3
- With the startDrag and stopDrag actions, a movie
clip can be draggable while a movie is playing - ActionScript statements can change the properties
of movie clip symbols, when a movie is playing
24Draggable Movie Clips in a Macromedia Flash Game
LESSON 3
- Each checker is a movie clip symbol, which you
can drag to a square
25ActionScript to Make the Movie Clip Draggable
LESSON 3
26Creating Conditional Statements
LESSON 3
- When creating conditions in ActionScript
- Use two equals signs ()
- Enclose all the actions to be carried out in
braces following the if action
27Example of a Conditional ActionScript Statement
LESSON 3
28Exercise
LESSON 3
- Create movie to drag a paddle to a bulb
- Create a paddle, Create a bulb
- Use instances of both on stage, text box
- Begin drag and then stop drag
- Compare
- if (hitTest(_root.myBulb))
- _root.beenHit "Hit"
-
- More drag and drop
- Need fli_3.fla
- Pages I-20 I-23
29Define Variables
LESSON 4
- Create an input text box
- Create a dynamic text box
- Use ActionScript to collect and modify string
variables - Use ActionScript to collect and perform
mathematical operations on numeric variables
30Understanding Variables
LESSON 4
- A variable is a container that holds information
- Create variables in ActionScript with the setvar
action or by using an equals sign () - To create a string variable, place quotations
marks around the string
31Using Text Fields to Collect User Information
LESSON 4
- An input text field takes information entered by
a user and stores it as a variable - A dynamic text field displays information derived
from variables
32Understanding Expressions
LESSON 4
- Expressions are formulas for manipulating or
evaluating the information in variables - Logical expressions perform true/false
comparisons on numbers and string
33Drawing the Text Box for the Input Text Field
LESSON 4
34Using the Property Inspector to Create an Input
Text Field
LESSON 4
35Folders with Actions to Create Expressions
LESSON 4
36Creating the Dynamic Text Field
LESSON 4
37Unit I Tasks
SUMMARY
- Use ActionScript and frame labels to create
navigation to specific frames on the timeline - Work in expert mode in the Actions panel
- Use ActionScript to control movie clip timelines
38Unit I Tasks
SUMMARY
- Use ActionScript to make a movie clip draggable
- Change the properties of a movie clip based on
user actions - Use ActionScript with interactive text and number
variables