A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [F8] Easy unload mc

  1. #1
    Senior Member
    Join Date
    May 2001
    Posts
    314

    [F8] Easy unload mc

    What is the easiest way so that when I press a button if first unloads all mc loaded, then loads the mc that the button calls for.

    something like an unloadmc (all)
    Dijhili

  2. #2
    Senior Member dlowe93's Avatar
    Join Date
    Aug 2001
    Location
    Stumptown
    Posts
    621
    Quote Originally Posted by Dijhili
    What is the easiest way so that when I press a button if first unloads all mc loaded, then loads the mc that the button calls for.

    something like an unloadmc (all)
    For me, the easiest way would be to push all of the loaded clips into an array, then run the array to unload the clips. Something like:

    Code:
    var loadClips:Array = new Array();
    
    function unloadAll():Void {
    
         while(loadClips.length > 0){
              var c:Object =  loadClips.pop();
              c.unloadMovie();
        }
    
        //load next clip(s);
    
    }

    Hope this helps.

    d.
    dlowe93

  3. #3
    Senior Member
    Join Date
    May 2001
    Posts
    314
    debugger reported errors all over the place.
    Dijhili

  4. #4
    Senior Member dlowe93's Avatar
    Join Date
    Aug 2001
    Location
    Stumptown
    Posts
    621
    Are you publishing to AS2, or AS1, and are you using this within a Flash movie or in an externa class?

    d.
    dlowe93

  5. #5
    Senior Member
    Join Date
    May 2001
    Posts
    314
    Actions script 2
    Dijhili

  6. #6
    Senior Member
    Join Date
    May 2001
    Posts
    314
    within the movie
    Dijhili

  7. #7
    Senior Member dlowe93's Avatar
    Join Date
    Aug 2001
    Location
    Stumptown
    Posts
    621
    Not sure why you are getting AS errors then. When I test the script as I wrote it, it's fine. What does the output say? Or better yet, do you have a larger part of your code to see it in context?

    d.
    dlowe93

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