A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: loading each scene as needed...

  1. #1
    Member
    Join Date
    Jun 2003
    Location
    Iowa
    Posts
    95

    loading each scene as needed...

    hey guys...i'll attach the fla file for you to play around with. i'm making a downloads section for my site. i have no content on it as of yet, but what i want to know is...i have people start on a main page (scene:main). they can navigate to four other sections...wallpaper, pictures, sounds, and icons...some of those scenes are going to be very large, and i don't want them to load with the initial load (the main scene). i want them to load as the person tries to go to them. so if he tries to go to "wallpaper" it would go to black screen and display my loading sign again until the "wallpaper" scene is loaded. same thing with the other 3 scenes. would it be easier to just do 4 different swf and html files then what i'm trying to do? can someone show me how to do this if it's pretty simple.
    Attached Files Attached Files
    --Alex

    Favorite Quote 1: When life lets you down... get back up!
    Favorite Quote 2: If at first you don't succeed... lower your standards!
    My Site: www.AlexLaird.net

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Location
    Philadelphia, PA, USA, Earth, Sol System, Spiral Arm of Milky Way, Local Group, Virgo Supercluster, Known Universe
    Posts
    470
    You don't need to use separate HTML pages, but I would suggest splitting your sections into separate FLA/swf files. This will allow users to only load those sections when called for.

    When you have the background elements that are in common for all scenes created in newindex.fla, make a copy of the file and call it wallpaper.fla.

    In wallpaper.fla, make the common background elements into guide layers, so you can see them for reference but they wil not be published with the final file.

    Then add the content you do want to include in the wallpaper.fla flie and publish it as an swf.

    Back in newindex.fla, set your "Wallpaper" navigation button to load the new movie:

    code:

    on(release) [
    loadMovieNum("wallpaper.swf", 1);
    ]



    This will load the wallpaper.swf movie in to a level (level1) over the main movie.

    You can choose any number for your level (I usually use 6), except that level 0 refers to the main movie. Higher numbers load over lower numbers.

    When you load another section, load it into the same level (in this case, 1), so it will replace the existing content in that level (automatically unloading the other section).
    Argon Zark!, The original interactive webcomic (since 1995)

  3. #3
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397

  4. #4
    Member
    Join Date
    Jun 2003
    Location
    Iowa
    Posts
    95
    thanks it worked! i've been trying to find out how to do this for a long time!!!
    --Alex

    Favorite Quote 1: When life lets you down... get back up!
    Favorite Quote 2: If at first you don't succeed... lower your standards!
    My Site: www.AlexLaird.net

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