Link to home
Start Free TrialLog in
Avatar of alex_wareing
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?
Avatar of Antonio Estrada
Antonio Estrada
Flag of Mexico image

I can't open your *.fla for some reason... Are you using Flash CS3?

Well anyway, I'd try to place a _root. before the gotoAndPlay() statement, it may help.

-V
Avatar of alex_wareing
alex_wareing

ASKER

Yes its CS3. I have reuploaded in flash 8 format. I have tried _root and that didn't work
ASKER CERTIFIED SOLUTION
Avatar of Antonio Estrada
Antonio Estrada
Flag of Mexico image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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