Some properties, called read-only properties, have values that you can read but cannot set.
(These properties are specified as read-only in their ActionScript 2.0 Language Reference
entries.) The following are read-only properties:
,
_framesloaded
_parent
You can write statements to set any property that is not read-only. The following statement
sets the
property of the
_alpha
instance:
car_mc
car_mc.wheel_mc._alpha = 50;
In addition, you can write statements that get the value of a movie clip property. For example,
the following statement gets the value of the
and sets the
property of the
_x
this.onEnterFrame = function() {
my_mc._x = _root._xmouse;
};
This is equivalent to the following code, which uses the
this.onEnterFrame = function() {
my_mc._x = getProperty(_root, _xmouse);
};
The
,
,
_x
_y
_rotation
properties are affected by transformations on the movie clip's parent, and transform the movie
clip and any of the clip's children. The
properties are global; they belong only to the level 0 main timeline. All other
_soundbuftime
properties belong to each movie clip or loaded level.
For a list of movie clip properties, see the property summary for the MovieClip class in
the ActionScript 2.0 Language Reference.
For an example of scripted animation in Flash, you can find a sample source file,
animation.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\Animation.
On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/Animation.
You can find samples of photo gallery applications on your hard disk.These files provide
examples of how to use ActionScript to control movie clips dynamically while loading image
files into a SWF file, which includes scripted animation. You can find the sample source files,
gallery_tree.fla and gallery_tween.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\Galleries.
358
Working with Movie Clips
,
,
_target
_totalframes
movie clip instance, which is a child of the
wheel_mc
instance to that value:
my_mc
,
,
,
_xscale
_yscale
_focusrect
,
_currentframe
,
,
_url
_xmouse
property on the current level's timeline
_xmouse
getProperty()
,
,
_height
_width
_alpha
,
_highquality
,
_droptarget
, and
.
_ymouse
function:
, and
_visible
,
, and
_quality
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?