First of all, I would like to apologise for not knowing whether this code belongs to F5 or FMX Action Script. I’m that noobish, yup.
Anyway, what happened in my flash document was, I created a button, “next_btn” with the following commands:
//to remove all the splats
gotoAndStop(“s1a2”,“gamereadys1a2”); //go to next level
I also attached a visibility code in a separate, ‘Actions’ movie clip:
At this point, almost everything worked perfectly. Everything, but one thing. Apparently, the swapDepths command wasn’t working. It was then that I thought maybe swapDepths only works on movie clips.
And so I converted the button into a movie clip. I modified the instance names, etc, and almost everything worked. Everything, including swapDepths, but one thing: the gotoAndStop command.
For some reason, when I tested the movie clip (containing a button) out, it removed the splat+score and finger_mc movie clips, as well as stoped the background music from playing. However, it did not go to the next scene and frame as specified by the gotoAndStop command. “s1a2” is the next scene, and “gameplays1a2” is its frame.
Can someone please tell me what went wrong?? All help appreciated.