Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / December 2005



Tip: Looking for answers? Try searching our database.

loadMovie & unloadMovie

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kees Kist - 30 Dec 2005 14:25 GMT
I'm making a small game with Flash which in turns loads even smaller games. To
make it easier to manage all the minigames are loaded from external swf files.

this.attachMovie("Placeholder","minigame",1);
this.minigame.loadMovie(minigames_list[game]);

This all works like it should. The external swf's all have a variable called
'finished', and when that's set to true the movie is supposed to get unloaded.

unloadMovie(this.minigame);
this.gotoAndPlay(10); // goto results screen

But for some that doesn't work. It does get to frame 10, but then the screen
stays black. I've used unloadMovie in combination with removeMovieClip() but
that didn't work either. I hope someone here as any clue of what's going on
here...
kglad - 30 Dec 2005 15:15 GMT
this.unloadMovie();
kglad - 30 Dec 2005 15:17 GMT
oops.  if that code is executed from within minigame, your this.gotoAndPlay(10)
wouldn't work.  if that code were executed from the timeline that contained
this.minigame, it would unload minigame.  something's not consistant in your
explanation.
Kees Kist - 30 Dec 2005 15:25 GMT
I don't really understand what you are trying to say. Using
unloadMovie(this.minigame) or this.minigame.unloadMovie() makes no difference
as far as I know. My gotoAndPlay does work, I've used trace("hello") to check
if it gets there. All of the code in my first post is executed from the main
timeline.
kglad - 30 Dec 2005 15:32 GMT
this.unloadMovie() is not the same as this.minigame.unloadMovie().

anyway, if this.gotoAndPlay(10) is taking you to frame 10 of the timeline that
contains your attachMovie() statement, then unloadMovie(this.minigame) would
work.
Kees Kist - 30 Dec 2005 15:36 GMT
Originally posted by: kglad
this.unloadMovie() is not the same as this.minigame.unloadMovie().

anyway, if this.gotoAndPlay(10) is taking you to frame 10 of the timeline that
contains your attachMovie() statement, then unloadMovie(this.minigame) would
work.

I ment that there is no difference in using the MovieClip.unloadMovie() or the
ancient 'global' unloadMovie(target). I think that I may be loading it wrong,
causing the loaded swf to 'overrule' the root timeline.
kglad - 30 Dec 2005 15:41 GMT
your point is irrelevent or there's something you're missing.  and the loaded
swf will not overrule anything in the loading swf unless there's a reference to
the _parent or _root timeline within that swf.
Kees Kist - 30 Dec 2005 16:33 GMT
Solved.

It works when I put in a stop() just before the unloadMovie. I haven't got a clue why, but I'll leave it like it is.

Thanks a lot kglad for trying to help!
kglad - 31 Dec 2005 01:07 GMT
you're welcome.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.