A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Unload all movies when going to new frame

  1. #1
    Junior Member
    Join Date
    Aug 2010
    Posts
    14

    Unload all movies when going to new frame

    I have a scene with buttons that call upon outside movies to be loaded. But when I click a button to go to a new frame, the outside movies on still being seen on top. Right now my button Action is:

    on (release) {
    gotoAndPlay(16);
    }


    What should it say to unload all movies then go the 16?

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    How are you loading the movies? What version of actionscript?
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  3. #3
    Junior Member
    Join Date
    Aug 2010
    Posts
    14
    Sorry, Flash CS3, with As2.

  4. #4
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Are you using loadMovie to load your SWF files? If so, you should be able to use unloadMovie to drop them.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  5. #5
    Junior Member
    Join Date
    Aug 2010
    Posts
    14
    Yes, i am using load movie, but there can be as many 60 swf playing at once. Is there a code to unload ALL movies?

  6. #6
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Well the easiest way to do that would be to load all of your MC into a single container, and when you are done, just simply unload the container, that will take care of all of them.

    But if not, then you have to run a loop to get them all.

    for(var n in root) { unloadMovie(root[n]); }

    (Mind you this is just an example)
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

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