MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual page 578

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

5.
Select Control > Test Movie, and drag the movie clip to test the collision detection.
Whenever the bounding box of the car intersects the bounding box of the area, the
status is
.
true
For more information, see hitTest (MovieClip.hitTest method) in the ActionScript 2.0
Language Reference.
Creating a simple line drawing tool
You can use methods of the MovieClip class to draw lines and fills on the Stage as the SWF
file plays. This lets you create drawing tools for users and draw shapes in the SWF file in
response to events. The drawing methods are
,
clear()
curveTo()
You can apply these methods to any movie clip instance (for example,
to a level (
_level0.curveTo()
The
and
lineTo()
curveTo()
specify a line color, thickness, and alpha setting for a line or curve with the
method. The
moveTo()
Stage coordinates that you specify.
The
and
beginFill()
gradient fill, respectively, and
or
beginFill()
beginGradientFill()
the specified movie clip object.
To create a simple line drawing tool:
1.
In a new document, create a button on the Stage, and enter
name in the Property inspector.
2.
Select Frame 1 in the Timeline.
3.
Select Window > Actions to open the Actions panel, if it is not already visible.
578
Creating Interaction with ActionScript
,
,
endFill()
lineTo()
).
methods let you draw lines and curves, respectively. You
drawing method sets the current drawing position to the x and y
beginGradientFill()
applies the fill specified in the last call to
endFill()
. The
,
beginFill()
beginGradientFill()
,
, and
lineStyle()
moveTo()
methods fill a closed path with a solid or
method erases what's been drawn in
clear()
clear_btn
,
.
), or
myClip.lineTo()
lineStyle()
as the instance

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents