A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Unloding a swf... AS2

  1. #1
    Knowsnothingaboutnothing
    Join Date
    Dec 2008
    Location
    Guatemala
    Posts
    42

    Unloding a swf... AS2

    So I use

    PHP Code:
    //create an empty mc container for content to display
    createEmptyMovieClip("content_box"200);
    content_box._x 1;
    content_box._y 308
    to create the space and then I use

    PHP Code:
    on (release) {
        
    loadMovie("webdesign.swf"1);

    to load it.. However... I have a second button beneath which loads a another one - the problem though is that the first one wont unload and itll stay there no matter what. I tried putting an on release unloadmovie etc. , 1) but then I get an error :S Any help would be greatly appreciated! Thank you!

  2. #2
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    Just curious, what are you doing with content_box? You're not loading your swf in to it... shouldn't it be

    PHP Code:
    on (release) {
        
    content_box.loadMovie("webdesign.swf");

    then
    PHP Code:
    unloadMovie(content_box); 
    or
    PHP Code:
    content_box._visible false
    Evolve Designs Interactive Media
    the natural selection

  3. #3
    Knowsnothingaboutnothing
    Join Date
    Dec 2008
    Location
    Guatemala
    Posts
    42
    I tried that to no avail It just clicks and nothing happens.The other way it works but it just doesnt unload - let me try to unload. Also im loading 1 swf from my main swf and then from the secondary (the one in question) I load a final one just an fyi.

  4. #4
    Knowsnothingaboutnothing
    Join Date
    Dec 2008
    Location
    Guatemala
    Posts
    42
    I tried all the combinations possible - and nothing Could it be that Ihave to specify a level? I'm so lost...

  5. #5
    Knowsnothingaboutnothing
    Join Date
    Dec 2008
    Location
    Guatemala
    Posts
    42
    OKAY! I got it. Its the simple stuff that always proves to be the most elusive.

    PHP Code:
    on (release) {
        
    unloadMovie(2)

    Unloading the level did the trick - at least with my original code. Thank you though for your kind help - I see you posted in my other thread and am going to try out the preloader as soon as I wrap the rest of this up. Thanks again!

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