![MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual Download Page 497](http://html1.mh-extra.com/html/macromedia/flash-mx-2004-actionscript/flash-mx-2004-actionscript_reference-manual_3378897497.webp)
MovieClip._droptarget
497
Example
The following example draws a circle with a hairline point, solid blue line, and a solid red fill.
_root.createEmptyMovieClip( "circle", 1 );
with ( _root.circle )
{
lineStyle( 0, 0x0000FF, 100 );
beginFill( 0xFF0000 );
moveTo( 500, 500 );
curveTo( 600, 500, 600, 400 );
curveTo( 600, 300, 500, 300 );
curveTo( 400, 300, 400, 400 );
curveTo( 400, 500, 500, 500 );
endFill();
}
See also
MovieClip.beginFill()
,
MovieClip.createEmptyMovieClip()
,
MovieClip.endFill()
,
MovieClip.lineStyle()
,
MovieClip.lineTo()
,
MovieClip.moveTo()
MovieClip._droptarget
Availability
Flash Player 4.
Usage
my_mc
._droptarget
Description
Property (read-only); returns the absolute path in slash syntax notation of the movie clip instance
on which
my_mc
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.
Note:
You must perform this conversion if you are using ActionScript 2.0, which does not support
slash syntax.
Example
The following example evaluates the
_droptarget
property of the
garbage
movie clip instance
and uses
eval()
to convert it from slash syntax to a dot syntax reference. The
garbage
reference
is then compared to the reference to the
trash
movie clip instance. If the two references are
equivalent, the visibility of
garbage
is set to
false
. If they are not equivalent, the
garbage
instance is reset to its original position.
if (eval(garbage._droptarget) == _root.trash) {
garbage._visible = false;
} else {
garbage._x = x_pos;
garbage._y = y_pos;
}
The variables
x_pos
and
y_pos
are set on Frame 1 of the SWF file with the following script:
x_pos = garbage._x;
y_pos = garbage._y;
Summary of Contents for FLASH MX 2004 - ACTIONSCRIPT
Page 1: ...ActionScript Reference Guide...
Page 8: ...8 Contents...
Page 12: ......
Page 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Page 54: ...54 Chapter 2 ActionScript Basics...
Page 80: ...80 Chapter 3 Writing and Debugging Scripts...
Page 82: ......
Page 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Page 112: ......
Page 120: ...120 Chapter 6 Using the Built In Classes...
Page 176: ......
Page 192: ...192 Chapter 10 Working with External Data...
Page 202: ...202 Chapter 11 Working with External Media...
Page 204: ......
Page 782: ...782 Chapter 12 ActionScript Dictionary...
Page 793: ...Other keys 793 221 222 Key Key code...
Page 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Page 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Page 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Page 816: ...816 Index...