1 Reply Latest reply on Feb 15, 2007 5:09 PM by butcho

    Load swf via Actionscript 2.0

    phi nupe
      I use Actionscript 2.0 to load an external swf [shared directory], followed 2 similar tutorials [1 from LiveDocs, the other from Flash 8 ActionScript Bible] neither works. Here is the code, if someone sees whatI'm missing I'd appreciate the assistance:

      this.createEmptyMovieClip("myswf.swf", 999);
      var site_mc:MovieClipLoader = new MovieClipLoader();

      // Create listener object:
      var mclListener:Object = new Object();
      mclListener.onLoadError = function(target_mc:MovieClip, errorCode:String, status:Number) {
      trace("Error loading movie clip: " + errorCode + " [ " + status + "]");
      };
      mclListener.onLoadStart = function(target_mc:MovieClip) :Void {
      trace("onLoadStart: " + target_mc);
      };
      mclListener.onLoadProgress = function(target_mc:MovieClip, numBytesLoaded:Number, numBytesTotal:Number) :Void {
      var numPercentLoaded:Number = numBytesLoaded / numBytesTotal * 100;
      trace("onLoadProgress: " + target_mc + " is " + numPercentLoaded + "% loaded");
      };
      mclListener.onLoadComplete = function(target_mc:MovieClip, status:Number) :Void {
      trace("onLoadComplete: " + target_mc);
      };

      my_mcl.addListener(mclListener);

      my_mcl.loadClip("myswf.swf");