Droptarget (Movieclip._Droptarget Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

_droptarget (MovieClip._droptarget property)

public _droptarget :
Returns the absolute path in slash-syntax notation of the movie clip instance on which this
movie clip was dropped. The
slash (
). To compare the
/
function to convert the returned value from slash syntax to a dot-syntax reference
(ActionScript 2.0 does not support slash syntax.)
Note: This property is supported in Flash Lite only if
or
true
System.capabilities.hasStylus
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example evaluates the
instance and uses
eval()
reference is then compared to the reference to the
garbage_mc
instance. If the two references are equivalent, the visibility of
they are not equivalent, the
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;
} else {
this._x = origX;
this._y = origY;
}
};
See also
startDrag (MovieClip.startDrag method)
,
method)
eval function
460
ActionScript classes
String
[read-only]
property always returns a path that starts with a
_droptarget
property of an instance to a reference, use the
_droptarget
is
_droptarget
to convert it from slash syntax to a dot syntax reference. The
instance resets to its original position.
garbage
System.capabilities.hasMouse
.
true
property of the
garbage_mc
trashcan_mc
garbage_mc
,
stopDrag (MovieClip.stopDrag
eval()
is
movie clip
movie clip
is set to
. If
false

Advertisement

Table of Contents
loading

Table of Contents