loadMovie help..?
- Guil07
-
Guil07
- Member since: Oct. 13, 2007
- Offline.
-
- Forum Stats
- Member
- Level 03
- Blank Slate
Hey..
I know a lot of flash-game developers use a button on their preloader which loadMovie...'s their actual game, in order to help protect their game from import..
I played around a little with loadMovie, but every time I load my game .swf, everything just seems to go crazy. Do I need to define variables and objects in my game to it's swf file; are local variables not seen as local if the swf is loaded from another swf...?
Help..? I haven't used loadMovie before, so I'm a little confused as to how exactly it works..
Thanks,
~Guil
- Denvish
-
Denvish
- Member since: Apr. 25, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (15,977)
- Block
-
- Forum Stats
- Member
- Level 46
- Blank Slate
Using _root within a loaded swf will refer to the holder swf, you'll need to replace _root.var with this.var or _parent.var within the loaded file
- Guil07
-
Guil07
- Member since: Oct. 13, 2007
- Offline.
-
- Forum Stats
- Member
- Level 03
- Blank Slate
Ah, I see.. That would be the problem.
It seems _root.loadMovie("MyApp.swf");
Keeps everything as before. So if I just remove anything that was there before the loadMovie - logically this would function perfectly, right? I'll try it out now.
Thanks a bunch Denvish, you hit the nail on the head.
~Guil



