1 Reply Latest reply on Jan 16, 2007 5:59 AM by NeilT31

    Waiting for 2 swf to load

    NeilT31
      Hi i want to load two external swf files in frame 1 before i animate the fade effects alpha that is on top of them to reveal them in frame. I can get it to work fine for 1 swf file but cant see how to get it to work for 2???

      Any help would be great thanks

      Neil
        • 1. Re: Waiting for 2 swf to load
          NeilT31 Level 1
          Just thought might be usefull to show you the code ive got working and the code ive messed with (messed up!) trying to get it to wait for 2 swfs to load! Thanks. I think my second effort is really wrong and im overcomplicating my problem!! hope someone can help!!

          //////////////////////////////////////////////////////// This works ///////////// ///////////////////////////////////////////////////////////////

          var mcLoader:MovieClipLoader = new MovieClipLoader();
          var myListener:Object = new Object();

          mcLoader.addListener(myListener);
          myListener.onLoadProgress = function(target_mc,bytesLoaded,bytesTotal) {

          if (bytesLoaded >= bytesTotal) {
          gotoAndPlay("Fade");
          }
          }


          mcLoader.loadClip("/Images/2.gif",picLoader);


          stop();

          //////////////////////////////////////////////////////// Trying to get it to wait to load 2 files ///////////////////////////////////////////////////////////////


          var mcLoader:MovieClipLoader = new MovieClipLoader();
          var myListener:Object = new Object();
          var myTextListener:Object = new Object();
          var picld:Number = new Number();

          mcLoader.addListener(myListener);
          mcTextLoader.addListener(myTextListener);

          picLd=0;

          myListener.onLoadProgress = function(target_mc,bytesLoaded,bytesTotal) {

          if (bytesLoaded >= bytesTotal) {
          picld=1;
          }
          }

          myTextListener.onLoadProgress = function(target_mc,bytesLoaded,bytesTotal) {

          if (bytesLoaded >= bytesTotal) {
          if (picld = 1) {
          gotoAndPlay("Fade");
          }
          }
          }
          mcLoader.loadClip("/Images/2.gif",picLoader);
          mcTextLoader.loadClip("delameretext.swf",textLoader);

          stop();