A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: unload movies

  1. #1
    Member
    Join Date
    May 2002
    Posts
    88

    unload movies

    Hi,

    I have about 25 .swf movies that load at different points in my main movie. Is there a simple piece of code to sal 'unload all movies, load another movie' or not?

    Grateful for any directions...

  2. #2
    Senior Member
    Join Date
    Aug 2002
    Location
    Dublin, Ireland
    Posts
    1,749
    1. Create a holder MC and load all your dynamic stuff inside it (in sub-holder movies). You can then holder.removeMovieClip() and replace it to start afresh.

    2. Adapt this function:
    PHP Code:
    function removeMCat(location) {
     for( var 
    i in location ){
      if(
    typeof(location[i])=="movieclip"){
       
    location[i].removeMovieClip();
      }
     }

    Either way, you want to be careful. It is all too easy to remove stuff that you didn't mean to or are dependent on if you get carried away.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center