EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Droptarget (Movieclip._Droptarget Property)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
854 ActionScript classes
mc.curveTo(r+x, -Math.tan(Math.PI/8)*r+y, r+x, y);
}
An example is also in the drawingapi.fla file in the Samples\ActionScript\DrawingAPI. The
following list gives typical paths to this folder:
Windows: \Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\
Macintosh: HD/Applications/Macromedia Flash 8/Samples and Tutorials/Samples/
See also
beginFill (MovieClip.beginFill method), createEmptyMovieClip
(MovieClip.createEmptyMovieClip method)
, endFill (MovieClip.endFill method),
lineStyle (MovieClip.lineStyle method), lineTo (MovieClip.lineTo method),
moveTo (MovieClip.moveTo method), Math
_droptarget (MovieClip._droptarget property)
public _droptarget : String [read-only]
Returns the absolute path in slash-syntax notation of the movie clip instance on which this
movie clip was dropped. The
_droptarget property always returns a path that starts with a
slash (
/). To compare the _droptarget property of an instance to a reference, use the eval()
function to convert the returned value from slash syntax to a dot-syntax reference.
Availability: ActionScript 1.0; Flash Player 4
Example
The following example evaluates the
_droptarget property of the garbage_mc movie clip
instance and uses
eval() to convert it from slash syntax to a dot syntax reference. The
garbage_mc reference is then compared to the reference to the trashcan_mc movie clip
instance. If the two references are equivalent, the visibility of
garbage_mc is set to false. If
they are not equivalent, the
garbage instance resets to its original position.
origX = garbage_mc._x;
origY = garbage_mc._y;
garbage_mc.onPress = function() {
this.startDrag();
};
garbage_mc.onRelease = function() {
this.stopDrag();
if (eval(this._droptarget) == trashcan_mc) {
this._visible = false;
NOTE
You must perform this conversion if you are using ActionScript 2.0, which does not
support slash syntax.

Table of Contents

Related product manuals