PDA

View Full Version : _droptarget


Nautica
10-23-2003, 01:45 PM
Ive tryed over and over again to get this right but It jus doesnt seem to be working.


the target = area1
the draggable object = ball


(code for ball)

on (press){
startDrag(this,true);
}
on (release){
stopDrag();
if (ball._droptarget == "/area"){
area._visible=false;
}
}

this should I work, i read up on alot of tutorials, dragging it and dropping it works, the droptarget jus wont work.

anyone have any ideas? flashmx2004.

Jesse
10-25-2003, 08:40 AM
Make sure your paths are valid.
Try this:
on (press){
startDrag(this,true);
}
on (release){
stopDrag();
trace(ball);
if (ball._droptarget == "/area"){
area._visible=false;
}
}
I just added the trace function. If it returns something like _level0.ball your paths are OK. If it returns 'undefined' or similar, then it's a paths issue.

If it's not a paths issue with relation to the ball reference, the 'area' reference is probably incorrect. If ball and area are on the same parent timeline, and that code is on ball, then you'll have to have something like
_parent.area._visible=false
[useastags]