A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: How to make sure randomly loaded externals swfs are fully loaded [F8]

Threaded View

  1. #1
    Junior Member
    Join Date
    Feb 2006
    Posts
    12

    How to ensure random external swf is fully loaded before moving to new frame [F8]

    I am randomly loading external swfs into my main movie. I've got the random part working. However, I don't know how to make sure the random swf is fully loaded before jumping to a specific frame in my main movie.

    I have a preloader inside each external swf, but I don't know how to make my main movie understand that the random swf is completely loaded before the main timeline should gotoandPlay("start").

    What I Have So Far:

    I have a blank MC (named "location") on the main stage, which I am using to hold the random swfs. On the first frame inside this MC, I have the following code:

    choice = Math.round(Math.random()*2);
    switch (choice) {
    case 0 :
    location.loadMovie("image0.swf");
    break;
    case 1 :
    location.loadMovie("image1.swf");
    break;
    case 2 :
    location.loadMovie("image2.swf");
    break;

    }

    Loading the random swfs is working perfectly. But after the external swf is fully loaded, I want to move onto a frame labeled "start" on the main stage. I just don't know how to make sure the random swfs are completely loaded before I say gotoandPlay("start").

    I've tried piecing together bits from so many tutorials, and I just don't know what I need to do to make it work with my current code.

    Thanks so much!
    Last edited by lsterling03; 08-28-2007 at 12:33 PM. Reason: edited to include flash version

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