A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: loading and unloading swf movies

  1. #1
    Getting Better With Time
    Join Date
    Jun 2001
    Location
    Canada
    Posts
    54

    Thumbs down

    Hello,

    I have been working on a site for quite some time, and decided to try something new. Normally I make movies where the preloader plays while the whole site loads, which works fine, however, I wanted to create one where each page making up the site loads independently of of one another and has a preloader that plays as it is loading.

    So far I have created swf files for each of the pages. I have a main page where an animated sequence plays and stops at the end presenting a number of buttons to open other pages/movies. So far I have used the following command

    on (release) {
    loadMovieNum ("about_gbc.swf", 0);
    }


    Whether this code is correct, it seems to work, and frame one of the about_gbc.swf file contains a preloader that appears to work. I am wondering if I need to incorporate an unload movie command, or does it automatically remove the movie when I direct it to level 0?

    As I said, it appears to me that the movie containing my menu does link up to the appropriate swf files, however, the problem I am experiencing now is that once I have successfully arrived at one of the links from the menu movie, I want to have a back button. I created a back button as follows....

    on (release) {
    loadMovieNum ("intro_menu.swf", 0);
    }


    Once again, I am not sure if this button is completely right, but it works, however, the menu page it directs you to is made up of 92 frames, and I don't want to continually have my visitors view the animated sequence each time they hit the home button. Instead, I would like to have the button return to the intro_menu.swf file and skip everything and stop on the final frame of the movie being (92). I hope this makes sense.

    One more question, if there is content in my swf files that are used repeatedly throughout my site, are the images etc cached, or do they need to be continually loaded when each swf file is being loaded. The reason I ask this is because, when I first made this site, I made the mistake of using 10 or so scenes rather than seperate swf files. Well the entire site was merely 250 kbs, whereas, when I took it apart and changed each scene into a swf file, each file became 70+ kbs, and I figured that these files could become monsters to download for those with dial up connections.

    I hope you can help,

    Greg

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    126

    What I think

    No sure if I am hearing you correctly, it looks like you have most of that correct, but you are loading the movies into a LEVEL.. I highly recommending loading them into a MOVIE TARGET, the reason being is you will have a lot more control over the movies.

    MAKE blank move target with instance of FIRST, then once they goto that first button and then click on the back button, then you can have

    on (release) {
    loadMovieNum ("intro_menu.swf", "FIRST");
    }
    Then you can always use the telltarget command wich telltarget="first" gotoAndPlay"25" wich is the frame after all the motion. I hope that makes since. I think you need to play around with the LOAD MOVIE in a TARGET.

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