alex_wareing
asked on
URGENT: Can't get gotoAndPlay work inside an onRelease function
Here you can find my FLA file http://dropbox.aiwmedia.com/gotoAndPlay.fla.
On frame 2 of the _root i have some lines of actionscript that control the box being dragged. The box is meant to be dragged to one of the three hitZones (the vans). On line 26 you can see an onRelease function for the box that checks if the box is on one of the drop zones and if it is it should then gotoAndPlay(21) the relevant frame in the boxContainer clip. The gotoAndPlay(21) statment is on line 31.
I can't get this gotoAndPlay to work, as you can see the trace works and proves that the if statment runs correctly. I have tried many different paths but i can't seem to find anyway to get the gotoAndPlay(21) to work. What am i doing wrong?
On frame 2 of the _root i have some lines of actionscript that control the box being dragged. The box is meant to be dragged to one of the three hitZones (the vans). On line 26 you can see an onRelease function for the box that checks if the box is on one of the drop zones and if it is it should then gotoAndPlay(21) the relevant frame in the boxContainer clip. The gotoAndPlay(21) statment is on line 31.
I can't get this gotoAndPlay to work, as you can see the trace works and proves that the if statment runs correctly. I have tried many different paths but i can't seem to find anyway to get the gotoAndPlay(21) to work. What am i doing wrong?
ASKER
Yes its CS3. I have reuploaded in flash 8 format. I have tried _root and that didn't work
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Lines 18 and 19 of should change though...
this._x = 167;
this._y = 297;
And maybe some other lines like this._width=100; and this._height=85; should be just after stopDrag();
-V
this._x = 167;
this._y = 297;
And maybe some other lines like this._width=100; and this._height=85; should be just after stopDrag();
-V
Well anyway, I'd try to place a _root. before the gotoAndPlay() statement, it may help.
-V