SWiSH Player Support
SWF4 or later - Supported Internally
Syntax
sprite._target
Arguments
sprite is the name of the Sprite / Movie Clip or Object.
Returns
Target path of the Sprite / Movie Clip or Object.
Description
This is a read-only property that returns the path name of the Sprite / Movie Clip or Object. The returned name is in 'slash' notation.
This is used in a comparison statement with the _droptarget property of another Sprite / Movie Clip or Object.
Unlike _name this returns the full path using slash notation.
Sample
Assume a Movie contains two Sprites, s1 and s2 (s2 is smaller than s1 so it can be completely covered).
The code below is for Sprite s1, no script is required for s2:
onEnterFrame() {
if (this._droptarget ==_parent.s2._target) {
trace("zap");
}
}
onSelfEvent (release) {
stopDrag();
}
onSelfEvent (press) {
this.startDragLocked();
}
if s2 is a Sprite owned by the main Movie Clip then its _target name is "/s2".
See Also
_droptarget