say i have a main movie, into this movie is loaded another movie on level_1.
is there any actionscript that allows a button inside the loaded movie control the main movie? i.o.w. can a button inside the loaded movie tell the main movie to go to another scene?
i am looking for code for that same button to unload the movie it is in itself… possible?
instead of the scene name and frame number, try with a frame label. go to Scene 2, highlight the first frame, and you’ll see an input field in the properties panel.
the script would change to:
_level0.gotoAndPlay("frameLabel");
as for unloading the swf…
there’s nothing wrong with the script, if you can’t get it to work… attach your files and i’ll check it out.
i also found the reason why it didn’t work before stripping my project, i think it was because the button in question was from the library of the mainmovie, only when i converted that button to an internal button (of the loaded movie itself) the code worked…
so my question is, do you know a solution for this?
anyway, i might be wrong, but i guess it didn’t worked because once the Button is imported to the movie, the on handler is erased. to solve the problem, give an instance name to the Button and paste this script in the timeline: