_droptarget
Top  Previous  Next


SWiSH Player Support
SWF4 or later - Supported Internally

Syntax
draggableInstance._droptarget

Arguments
draggableInstance is the name of the draggable Instance Movie Clip / Sprite or Object.

Returns
Name of the Movie Clip / Sprite that draggableInstance has been dragged over.
The return value is in "slash" notation.

Note: The property will only change in the Object that is being dragged

Description
This is a read-only property.

Sample
Assume a Movie contains two Sprites, s1 and s2.
code below is for Sprite s1...
no script is required for s2.
"zap" is displayed in the 'Debug' Panel if s1 is dragged over s2.

Note:
·If s2 was dragged over s1, s1._droptarget (this._droptarget) would not change, but s2._droptarget would show "/s1"  
·To enter the if statement, use the if (_droptarget) option  

onEnterFrame() {
    if (this._droptarget ==_parent.s2._target) {
        trace("zap");
    }

}

onSelfEvent (release) {
    stopDrag();
}


onSelfEvent (press) {
    this.startDragLocked();
}


See Also
_target