7 Replies Latest reply on Sep 19, 2010 7:58 AM by kglad

    How i can add to an preloader some external swf

    Ex0skelet0r

      Helo, i have this preloader:

      onClipEvent (load) {

      total = _root.getBytesTotal();

      }

      onClipEvent (enterFrame) {

      loaded = _root.getBytesLoaded();

      percent = int(loaded/total*100);

      text = percent+"%";

      gotoAndStop(percent);

      if (loaded == total) {

      _root.gotoAndPlay(2);

      }

      }

      and on a movie clip with the name all pages in frame 6 i load some swf files with this way:
      swf_path="mysongs.swf"
      loadListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void  {
      info.text = Math.round((bytesLoaded/bytesTotal)*100)+"%";
      };
      loadListener.onLoadInit = function(target_mc:MovieClip):Void  {
      info.text = "";
      };
      var mcLoader:MovieClipLoader = new MovieClipLoader();
      mcLoader.addListener(loadListener);
      mcLoader.loadClip(swf_path, swf_loader);
      How i may preload those files too with the preloader? Is it safe to just use the code from the frame 6 inside the preloader?