A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Preloading levels HELP

  1. #1
    Senior Member
    Join Date
    Mar 2000
    Posts
    161

    Wink

    How do you preload a level from another level?


    IN LEVEL 1:

    ifFrameLoaded ("_level2", 20) {
    tellTarget ("_level2") {
    gotoAndPlay (2);
    }

    }

    Is this right?

  2. #2
    Senior Member
    Join Date
    Feb 2001
    Posts
    206
    Where are you preloading level2 from? This is an if statement which is checking to see if _level2 is loaded. Are you loading level2 from level0? Also, tell target is deprecated. you can just use:

    _level2.gotoandplay(2)

    instead.

    Flashlite

  3. #3
    Hack
    Join Date
    Mar 2000
    Location
    Madison, WI
    Posts
    1,753
    You can't really do that, because loaded movies won't play at all until they are fully loaded.

  4. #4
    Senior Member
    Join Date
    Mar 2000
    Posts
    161
    Here's what im doing...
    I have a movie1.swf that is in level 0.

    In the process of movie1.swf playing, it has commands to load movie2.swf into level 2 and movie3.swf into level 3.

    Both movie2 and movie3 have a blank frame and a stop action in frame 1.

    There's a button in movie1.swf that when pressed, tells _level2 and _level3 to gotoAnd Play(2).

    But if those 2 levels arent loaded completely there's just a blank screen.

    Thats why I want to load a preloader into level 1 that checks to see if _level2 and _level3 are completly loaded and then tells them to gotoAndPlay(2) and sends level 1 to a blank frame

    does that make any sense?

  5. #5
    Senior Member
    Join Date
    Feb 2001
    Posts
    206
    It seems to make sense. If u attached as to the button on level0 to run a level1 preloader then you could attach as to a frame on level1:

    ifFrameLoaded ("_level2", 20) {
    _level2.gotoAndPlay (2);

    If level 2 is not loaded, the level1 preloader would continue to play ( would need to loop back to frame 1 and run again until level2 is loaded ).

    BUT you want BOTH a level2 and level3 movie to run simultaneously? Could one run before the other? ( i.e. level2 first, then level3? )

    Flashlite

  6. #6
    Senior Member
    Join Date
    Mar 2000
    Posts
    161
    Thanks for the help flashlite.....But I think Im gonna dumped this whole idea of mine....I changed my thought process and I posted it on a new thread here in flash 5 actionscript fourm. Thanks again!

  7. #7
    Senior Member
    Join Date
    Sep 2000
    Posts
    106
    I know that the issue for you might be dead and changed, but i thought i;d throw in my fix into the mix...

    I had a lot of problems getting my main scene to acknowledge if the scenes were all loaded on the different levels... so I did this...

    I stuf a preloading script of sorts on each scene, just to check if they had loaded... and when they were all loaded, they set a variable like _root.swf1 = 1; and such...

    the main scene waited till all the scenes set a variable as 1 and then it went on..

    ... just an odd work around I found made sence somewhat


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