Professional Web Applications Themes

PLEASE HELP - load into levels, not working in browser - Macromedia Flash Actionscript

I JUST GOT YOUR REPLYS..!!! THANKS..!! I've got a stop(); action in frame 1 of the intro because I want to make sure its totally loaded before I do anything with it. Then, once I am sure it is totally loaded, I tell _level20 ( intro.swf ) to start playing. It will go to another holding stop frame on its timeline. Then we start loading the main site ( site.swf ) into _level0. From the main site ( site.swf ) I tell _level20 ( intro.swf ) to gotoAndPlay it's movie. Here is the actionscript from the first embedded swf that ...

  1. #1

    Default Re: PLEASE HELP - load into levels, not working in browser

    I JUST GOT YOUR REPLYS..!!!

    THANKS..!!


    I've got a stop(); action in frame 1 of the intro because I want to
    make sure its totally loaded before I do anything with it.

    Then, once I am sure it is totally loaded, I tell _level20 ( intro.swf )
    to start playing. It will go to another holding stop frame on its timeline.
    Then we start loading the main site ( site.swf ) into _level0.

    From the main site ( site.swf ) I tell _level20 ( intro.swf ) to gotoAndPlay it's movie.


    Here is the actionscript from the first embedded swf that starts it all.
    (This works when played in the player, but not in the htm pg - the problem)
    Its a 4 frame movie named - BASELINE.SWF


    ____________________________________________

    FRAME 1

    fscommand ("fullscreen", "false");
    fscommand ("allowscale", "false");
    // stop();
    trace("BASELINE - frame 1");

    ____________________________________________


    FRAME 2

    loadMovie("intro.swf", "_level20");

    trace("BASELINE - now at frame 2 LOAD intro.swf into _level20");
    ____________________________________________


    FRAME 3

    stop();
    // _level20._visible = 0;

    total_bytesLevel = _level20.getBytesTotal();
    loaded_bytes = _level20.getBytesLoaded();
    percentLevel = int((loaded_bytes/total_bytesLevel)*100);
    //
    // percentBox = percentLevel+"%";
    // loading = int(_level20.getBytesLoaded())+" of "+int(_level20.getBytesTotal()/1024)+"Kb";
    // loading = int(_level20.getBytesLoaded()/1024)+" of "+int(_level20.getBytesTotal()/1024)+"Kb loaded";
    // bytesBox = loading;
    // bar._xscale = percentLevel;

    if (percentLevel == 100) {
    this.nextFrame();
    _level20.gotoAndPlay("intro_begin");
    }

    trace("BASELINE - frame 3. _level 20 visible = 0 CHECKING _level20 bytes loader");
    ____________________________________________


    FRAME 4

    stop();
    // _level20._visible = 1;
    loadMovie("site.swf", _level0);

    trace("BASELINE - frame 4. LOADING SITE NOW - into _level0");
    trace("BASELINE - frame 4. _level0 SITE will start contentFunction");


    _____________________________________________

    // END OF SWF


    Thanks for your help and suggestions..!!!



    aistudios webforumsuser@macromedia.com Guest

  2. #2

    Default Re: PLEASE HELP - load into levels, not working in browser

    >>Then we start loading the main site ( site.swf ) into _level0.<<

    AH HA!! Once you load something different into _level0, you just UNLOADED
    everything else. Leave _level0 alone and see how it works out.

    Regards,
    --Vern


    _posted.by\(Vern\); Guest

  3. #3

    Default Re: PLEASE HELP - load into levels, not working in browser

    Hi... just got your replies... Tues at 11:30am
    I think you guys have figured it out..!!!!!

    So... just to make sure. Anything that _level0 does, such as loading a swf into another level,
    basically gets erased... thrown away... canceled... voided...
    if it's replaced by loading another movie into itself. ie: loadMovie(site.swf, "_level0");

    Correct..??

    So... If I want to make sure intro.swf is fully loaded in _level20
    prior to starting the loading for site.swf.... would this be a way to
    make sure this happens..??


    THE FIRST SWF EMBEDDED IN - inner__jan1304.htm
    baseline.swf

    baseline.swf loads intro.swf into _level20.
    loadMovie(intro.swf, "_level20");
    It has a looping frame action of some sort
    checking if _level20 is fully loaded.

    if _level20 is 100% loaded -
    (intro.swf has a couple of stop actions, so as to stop again and not play even though it is fully loaded)
    (the second stop action having a FRAME LABEL NAMED - intro_begin )

    - it goes to the next frame (we are still in baseline.swf )
    which loads site.swf into _level0.
    loadMovie(site.swf, "_level0);

    Now with site.swf at _level0, I place another action to
    loadMovie(intro.swf, "_level20");
    Hopefully, since intro.swf was previously loaded with baseline.swf, it would still be in cache, thus loading immediately.
    __________________________________
    QUESTION
    ??? Does baseline.swf being replaced with site.swf make calling intro.swf again force site.swf to have to going back up to the server... thus, ruining what I am trying to do here??? - Does this question make sense..??
    __________________________________

    (continuing)
    Unknown to the user, site.swf (now at _level0) is continuing to load itself - (baseline.swf told site.swf to start loading into _level0 after it made sure that intro.swf was fully loaded in _level20) -

    as intro.swf (at _level20) is playing it's movie. (this is happening because site.swf told intro.swf, to begin playing...)
    _level20.gotoAndPlay("intro_begin");



    ________________________________

    The main question here now, if this does in fact work, is the question from above about cache and calling the same swf to load twice from two different swfs.


    THE SAME QUESTION FROM ABOVE:
    ??? Does baseline.swf being replaced with site.swf make calling intro.swf again force site.swf to have to going back up to the server... thus, ruining what I am trying to do here??? - Does this question make sense..??

    _________________________________

    QUESTION -
    There is probably a smoother way to accomplish what I am trying to do, but I think this may work.
    What do you think..??? Any suggestions on a more efficient, cleaner way to accomplish what I am trying to do..??

    ______________________________

    Thanks for your time... I appreciate everyone's input..!!



    aistudios webforumsuser@macromedia.com Guest

  4. #4

    Default Re: PLEASE HELP - load into levels, not working in browser

    To be hones with you, this is confusing. Nothing against YOU! I get
    confused when doing things like this myself! I just never had to try and
    undertand someone ELSES setup! ANYway ...

    > basically gets erased... thrown away... canceled... voided...
    > if it's replaced by loading another movie into itself. ie:
    loadMovie(site.swf, "_level0");
    >
    > Correct..??
    YES!


    > So... If I want to make sure intro.swf is fully loaded in _level20
    > prior to starting the loading for site.swf.... would this be a way to
    > make sure this happens..??
    > THE FIRST SWF EMBEDDED IN - inner__jan1304.htm
    > baseline.swf
    >
    > baseline.swf loads intro.swf into _level20.
    > loadMovie(intro.swf, "_level20");
    > It has a looping frame action of some sort
    > checking if _level20 is fully loaded.
    >
    > if _level20 is 100% loaded -
    > (intro.swf has a couple of stop actions, so as to stop again and not play
    even though it is fully loaded)
    > (the second stop action having a FRAME LABEL NAMED - intro_begin )
    >
    > - it goes to the next frame (we are still in baseline.swf )
    > which loads site.swf into _level0.
    > loadMovie(site.swf, "_level0);

    ===============================
    HERE is where a problem lies. You have to leave _level0 alone once you
    start this process. It seems that you are just trying to get the swf
    uploaded to the users machine, then tossing out everything and starting over
    again from scratch. Which, frankly, doesn't make sense to me. Do you know
    that you can leave any movie on any level parked and blank just sitting
    there? No need to unload, replace it, if you dont need or want to. Simply
    have the movie stop on a completely empty frame, and it will be there,
    waiting for a command, but it will be invisible and functionless until you
    tell it to do something. SO... If it were me, I would rethink my strategy
    and use different levels, and leave _level0 alone, leaving your initial
    movie there and parked on an empty frame, thus being completly invisible.
    Does that make sense?
    ===============================

    > Now with site.swf at _level0, I place another action to
    > loadMovie(intro.swf, "_level20");
    > Hopefully, since intro.swf was previously loaded with baseline.swf, it
    would still be in cache, thus loading immediately.
    > __________________________________
    > QUESTION
    > ??? Does baseline.swf being replaced with site.swf make calling intro.swf
    again force site.swf to have to going back up to the server... thus,
    ruining what I am trying to do here??? - Does this question make sense..??
    > __________________________________
    That would depend on the users machine settings, but for the most part, I
    would have to say no, it would not have to reload.
    >
    > (continuing)
    > Unknown to the user, site.swf (now at _level0) is continuing to load
    itself - (baseline.swf told site.swf to start loading into _level0 after it
    made sure that intro.swf was fully loaded in _level20) -
    >
    > as intro.swf (at _level20) is playing it's movie. (this is happening
    because site.swf told intro.swf, to begin playing...)
    > _level20.gotoAndPlay("intro_begin");
    >
    >
    >
    > ________________________________
    >
    > The main question here now, if this does in fact work, is the question
    from above about cache and calling the same swf to load twice from two
    different swfs.
    >
    >
    > THE SAME QUESTION FROM ABOVE:
    > ??? Does baseline.swf being replaced with site.swf make calling intro.swf
    again force site.swf to have to going back up to the server... thus,
    ruining what I am trying to do here??? - Does this question make sense..??
    >
    > _________________________________
    >
    > QUESTION -
    > There is probably a smoother way to accomplish what I am trying to do, but
    I think this may work.
    > What do you think..??? Any suggestions on a more efficient, cleaner way
    to accomplish what I am trying to do..??_____________
    >
    > Thanks for your time... I appreciate everyone's input..!!



    As I said earlier, I would rethink my strategy. It seems to me that you are
    complicating it alot more than it needs to be.

    I usually use a movie I call "init.swf" that the html page calls, so it is
    loaded into _level0 by default.
    That movie then calls my preloader movie, but before it does, it assigns a
    value to a variable I call "request". For example, request = "intro";
    The preloader movie loads and calls the next movie to load into _level5 by
    using that variable and adding an ".swf" into it. like this:

    loadMovieNum(request + ".swf", 5);

    From now on, my preloader is responsible for loading any movie that is
    requested into _level5. This way, with any button anywhere, I can change
    the value of my variable named "request" then command my preloaded to play
    again, and it will load a different movie. Make any sense? The preloader
    is ALWAYS there, sitting on an empty frame, waiting for a command. No need
    to unload it.

    You can make this system as complex as you want - using frames (graphics
    frames, not html frames), backgrounds, seperate levels for a menu whatever,
    but you dont have to unload them ever it you are going to need them again.
    In my case, the examples would be for loading different modules (like html
    pages) into _level5, and that of course removed the existing movie. But, as
    you asked, those movies are indeed in cashe, and come up instantly should
    the user revisit a "page" he has already seen.

    So if I grasp your setup, leave baseline.swf there on _level0 and load
    site.swf into another _level. Seems to me it would simplfy things.

    I think I will stop now, not knowing if I have helped or clouded the issue
    further.

    Regards,
    --Vern





    _posted.by\(Vern\); Guest

Similar Threads

  1. load external text to dynamic text field in levels
    By GaiHo in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: February 10th, 01:29 AM
  2. Projector.exe not working 8 levels from root
    By xaphod webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 5
    Last Post: February 4th, 08:31 AM
  3. what are the pros and cons of using MC's to load .swf files or levels?
    By ascensiongrafxx webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 3
    Last Post: February 2nd, 07:21 PM
  4. Load and unload movie levels not working
    By captain_kirk webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 0
    Last Post: November 13th, 03:29 PM
  5. Testing in browser SWFs not loading into levels
    By cfxcreative webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 3
    Last Post: August 30th, 05:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139