MACROMEDIA FLASH 8-LEARNING FLASH LITE 1.X ACTIONSCRIPT Manual page 14

Learning flash lite 1.x actionscript
Table of Contents

Advertisement

You can also call code that resides on another timeline, such as a movie clip's timeline. To
execute the code, specify the movie clip instance name followed by a colon, and then the
frame number or label. For example, the following ActionScript calls the code that resides on
the frame labeled
moveUp
call("callClip:moveUp");
This technique is often used to create call clips or function clips—movie clips whose sole
purpose is to encapsulate regularly used code. A call clip contains a keyframe for each function
you want to create. You typically label each keyframe according to its purpose. Macromedia
also recommends that you create a new layer for each new keyframe, and that you give each
layer the same name as the frame label you assign to the keyframe.
The following figure shows the Timeline of an example call clip. The first keyframe of a call
clip always contains a
over the frames in its Timeline. Subsequent keyframes contain code for each "function." Each
function keyframe is labeled to identify what it does. To make editing and viewing the call
clip easier, each function keyframe is typically inserted on a separate layer.
Each keyframe contains code.
The following procedure explains how to create and use a call clip.
To create and use a call clip:
1.
In Flash Professional 8, create a new document from the Flash Lite 1.1 Symbian Series 60
document template.
2.
Select Insert > New Symbol.
3.
In the Create New Symbol dialog box, type Call Clip in the Name text box, and then
click OK.
The movie clip opens in editing mode.
14
Flash 4 ActionScript Primer
in the movie clip instance named
action, which ensures that the playhead doesn't continually loop
stop()
First keyframe contains
Frame labels
callClip
action
stop()
:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-LEARNING FLASH LITE 1.X ACTIONSCRIPT and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents