3 Replies Latest reply on Apr 30, 2009 3:44 PM by kglad

    load external swf

    pate_amy

      Hi,

      I'm using Actionscript 2, and I would like to load an external swf into my main swf. Does anyone know how to do that with Actionscript 2?

       

      I found this code for Actionscript 3, but then I would have to redesign my entire main swf, and I don't want to do that.

       

      ///////////// Actionscript 3 example. How would I do this in Actionscript2?////////////

      var Xpos:Number=50;
      var Ypos:Number=50;
      var swf:MovieClip;
      var loader:Loader=new Loader();

       

      var defaultSWF:URLRequest=new URLRequest("external.swf");

       

      loader.load(defaultSWF);
      loader.x=Xpos;
      loader.y=Ypos;
      addChild(loader);

       

      Thanks!