A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Checking when external datas is loaded??

  1. #1
    Senior Member
    Join Date
    Jul 2000
    Posts
    127

    Wink

    Hey,

    I'm making a game that loads a lot of external data. Problemo is that I really get trouble when the external files are not yet loaded (slow connection or stuff like that). How can I check wheter the external .swf is loaded or not???

    Tanks!

  2. #2
    Senior Member
    Join Date
    Nov 2000
    Posts
    117
    maybe even onclipevent data works for loading in swfs although i have never tried it this way.

    you try it!

  3. #3
    Senior Member martin47's Avatar
    Join Date
    Dec 2000
    Posts
    413
    set a variable at the end of each swf that goes to the main movie: _root.movie1loaded = 1;

    Then, make a loop on the main movie checking when that variable changes from nothing to 1, then, it is loaded.

  4. #4
    Senior Member framais's Avatar
    Join Date
    Oct 2000
    Location
    London, UK
    Posts
    118
    make so that the last variable to load is something like this:

    dataloaded=OK

    then you can create a keyframe right after the frame that contains the actionscript for loading the data, with the following script:

    if dataloaded == "OK" {
    gotoAndPlay("go_ahead");
    }else {
    prevFrame();
    }

    This way you loop the action that loads the data until all the data are loaded.

    Hope it helps

  5. #5
    Senior Member
    Join Date
    Jul 2000
    Posts
    127
    Thanks!! Check http://www.xystes.com/demo/platformer for the game I used it in. (work in progress demo)

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