926
ActionScript classes
top
:Number
[optional] - Value relative to the coordinates of the movie clip's parent that
specify a constraint rectangle for the movie clip.
right
:Number
[optional] - Value relative to the coordinates of the movie clip's parent that
specify a constraint rectangle for the movie clip.
bottom
:Number
[optional] - Value relative to the coordinates of the movie clip's parent that
specify a constraint rectangle for the movie clip.
Example
The following example creates a draggable movie clip instance called
mc_1
:
this.createEmptyMovieClip("mc_1", 1);
with (mc_1) {
lineStyle(1, 0xCCCCCC);
beginFill(0x4827CF);
moveTo(0, 0);
lineTo(80, 0);
lineTo(80, 60);
lineTo(0, 60);
lineTo(0, 0);
endFill();
}
mc_1.onPress = function() {
this.startDrag();
};
mc_1.onRelease = function() {
this.stopDrag();
};
See also
_droptarget (MovieClip._droptarget property)
,
startDrag function
,
stopDrag
(MovieClip.stopDrag method)
stop (MovieClip.stop method)
public stop() : Void
Stops the movie clip that is currently playing.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Availability:
ActionScript 1.0; Flash Player 5
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...