Enabled (Movieclip.enabled Property) - MACROMEDIA FLASHLITE2 ACTIONSCRIPT-LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

Example
The following example duplicates a newly created MovieClip a number of times and traces
the target for each duplicate.
var container:MovieClip = setUpContainer();
var ln:Number = 10;
var spacer:Number = 1;
var duplicate:MovieClip;
for(var i:Number = 1; i < ln; i++) {
var newY:Number = i * (container._height + spacer);
duplicate = container.duplicateMovieClip("clip-" + i, i, {_y:newY});
trace(duplicate); // _level0.clip-[number]
}
function setUpContainer():MovieClip {
var mc:MovieClip = this.createEmptyMovieClip("container",
this.getNextHighestDepth());
var w:Number = 100;
var h:Number = 20;
mc.beginFill(0x333333);
mc.lineTo(w, 0);
mc.lineTo(w, h);
mc.lineTo(0, h);
mc.lineTo(0, 0);
mc.endFill();
return mc;
}
See also
loadMovie (MovieClip.loadMovie method)
(MovieClip.removeMovieClip method)

enabled (MovieClip.enabled property)

public enabled :
A Boolean value that indicates whether a movie clip is enabled. The default value of
is
. If
is set to
true
enabled
handlers are no longer invoked, and the Over, Down, and Up frames are disabled. The
property does not affect the Timeline of the movie clip; if a movie clip is playing, it
enabled
continues to play. The movie clip continues to receive movie clip events (for example,
,
mouseDown
mouseUp
462
ActionScript classes
Boolean
, the movie clip's callback methods and
false
,
, and
keyDown
keyUp
,
removeMovieClip
,
duplicateMovieClip function
).
enabled
event
onaction

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash lite 2

Table of Contents