A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Preload ? and multiple scene ??

  1. #1
    first, i need to know if all of this will work...
    i have the preloader in Scene 1 all by itself. (Y or N?) i want it to load many scenes (the whole movie). (Y or N?)
    with this preloader, is at possible to get all scenes, MC's, etc...(everything) to preload? will this automatically be done since all scenes are still a part of the main movie?

    the main movie starts in scene 2, with all content starting on frame 2 (does this need to happen since it is a new scene? or can it start on frame 1?)

    now this is a site, so is it better to build the multiple "pages/sections" of the site in different scenes, or just go with 1 big ass flick? i am starting to build them in diff scenes for organization.

    now, i understand the preloader, and can handle a basic one by myself, but this is someone else's, and i am confused on the actionscript... this is what the AS in the first frame of the PreLoader is:

    total = int(_root.getBytesTotal()/1000);
    download = int(_root.getBytesLoaded() /1000);
    if (total==download) {
    tellTarget ("../") {
    play ();
    }
    } else {
    play ();
    }


    for me to check all scenes, what is that script going to look like? what is the ../ there for?


    last question for now... is there any way to have flip an animation (movie clip) so that it will play from the other direction? not a reverse. but if instance 1 of the clip goes from bottom to top, can i use another instance of the same clip and have it go top to bottom? i am guessing i could use reverse, but it is a shape tween, which will not look correct.

    thanks,
    dub


    [Edited by dub713 on 01-04-2001 at 05:24 AM]

  2. #2
    ActionScript.org
    Join Date
    Aug 2000
    Posts
    1,030
    i have the preloader in Scene 1 all by itself Yes
    i want it to load many scenes (the whole movie). yes

    Preloading generally preloads the entire movie for ease, so yes it's possible to do
    Your content can start anywhere, the preloader will load the movie up frame by frame, progressively, so long as your movie doesn't start at the end you shoul dhave no problems (That was a joke by the way).

    I put all my stuf fin once scene for ease of reference because my movies always involve interaction andgenerally don't have so much content. Many scenes are good for multiple animations and sites with lots of content. It's really just a preference thing.

    Your code is a bit funny. Th e"../" tells the level above the current clip something. It's a path which you can read about in my paths tutorial:
    http://www.actionscripts.org/tutoria...hs/index.shtml

    For my tutorial on preloaders see: http://www.actionscripts.org/tutoria...rs/index.shtml

    I've made it as easy to understanda as I can.

    Finally, if you have an animation that goes from say, left to right, you can flip it horizontally using the edit menu and it will play from righ to left. Is that what you're after?

    Cheers

    Jesse

  3. #3
    okay... got it all except for the scripting part. i checked out the tutorials over there. great, another site to read!! but seriously, glad to have that link now, i'll definitely read through it all...

    now, with the script, i know what ../ means under normal circumsatnces (back up a level) just like html...

    but in your script it is clear to see: gotoAndPlay ("Scene 2", 1);

    in the one i have here though, where am i specifying this?

    total = int(_root.getBytesTotal()/1000);
    download = int(_root.getBytesLoaded() /1000);
    if (total==download) {
    tellTarget ("../") {
    play ();
    }
    } else {
    play ();
    }

    i understand the total, the download, getbytesloaded, if the total, equals the downloaded, tell target, play... correct? i should specify scene 2, frme 1 in that "play" correct? for the "else" play, what should be there?

    i think thats it. if i don't get this, i'll work on building a custom loader following the tutorials, and the other code...

    thanks,

    later.
    dub

  4. #4
    ActionScript.org
    Join Date
    Aug 2000
    Posts
    1,030
    I would change the code, as the code you've been given is kind of silly. It would be a lot easier to use my code or any other standard preloader code which uses the ifFrameLoaded function, however if you're set on using this one then try something like this:

    total = int(_root.getBytesTotal() /100 0);
    download = int(_root.getBytesLoaded() /100 0);
    if (total==download) {
    // insert goto and play action here
    } else {
    play ();
    }
    This code should be on frame 1 of your main timeline, and frame 2 should have a gotoAndPlay to loop back to it.
    Replace "// insert play action here" with a gotoAndPlay call to th first frame that begins the content of your movie, whether it be in the same scene or not doesn't matter.

    My tutorial goes to Scene 2, Frame 1 because that is the beginning of the content. Everything in Scene 1 is the preloader, hence I'm not intersted in it once the file has loaded.


    Cheers

    Jesse

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