Hi i am creating a shooting game in AS3,my problem is that i cant do what i used to in AS2.
In AS2 i used to have many SWF files for one game(main.swf, level1.swf, level2.swf …),main.swf would open first and i was jumping from one SWF file to other using
[COLOR=#993300]unloadMovieNum[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000FF]"level1.swf"[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#993300]loadMovieNum[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000FF]"level2.swf"[/COLOR], [COLOR=#000000]1[/COLOR][COLOR=#000000])[/COLOR];
and that is all you needed in AS2 game when you finish level and you want to go to next level, but in AS3 things are little bit complicated.
I only know how to LOAD level1.swf into main.swf but when i want to UNLOAD
level1.swf and jump to level2.swf nothing works for me.
Here is the code what i used
main.swf: you click a button named “my_mc” and level1.swf loads
[COLOR=#993300]function[/COLOR] newvid[COLOR=#000000]([/COLOR]event:MouseEvent[COLOR=#000000])[/COLOR] [COLOR=#000000]{
[/COLOR] [COLOR=#993300]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000FF]"you clicked me"[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#993300]var[/COLOR] loadit = [COLOR=#993300]new[/COLOR] Loader[COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
addChild[COLOR=#000000]([/COLOR]loadit[COLOR=#000000])[/COLOR];
loadit.[COLOR=#993300]load[/COLOR][COLOR=#000000]([/COLOR][COLOR=#993300]new[/COLOR] URLRequest[COLOR=#000000]([/COLOR][COLOR=#0000FF]"level1.swf"[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR]
my_mc.[COLOR=#000000]addEventListener[/COLOR][COLOR=#000000]([/COLOR]MouseEvent.[COLOR=#000000]MOUSE_DOWN[/COLOR], newvid[COLOR=#000000])[/COLOR];
level1.swf:what i would want is when i click a button named load_btn it unloads level1.swf and loads level2.swf
[LEFT]load_btn.[COLOR=#000000]addEventListener[/COLOR][COLOR=#000000]([/COLOR]MouseEvent.[COLOR=#000000]MOUSE_DOWN[/COLOR], loadlevel2[COLOR=#000000])[/COLOR];
[/LEFT]
This is probably easy for AS3 users but i am pretty new in all this so any help or idea would be appreciated.