6 Replies Latest reply: Jul 30, 2012 7:22 AM by edwinmerced RSS

    Load..attach and unload question

    edwinmerced Community Member

      Hello forum members:


      1) I have a main movie that loads an external movie with this code:


      var loader:Loader = new Loader();

          loader.load(new URLRequest("lessons/lessona/lessona.swf"));



          var myTween:Tween = new Tween(loader, "x", Strong.easeIn, 1500, 0, 1, true);


      2) The loaded movie attaches a movieclip from the loaded movieclip library with this code:


      var mc:alert_mc=new alert_mc();






      3) From the attached movie clip I am trying to remove the attached clip and the loaded movie (and return to my main movie) with this code when the user clicks yep_btn but it is unsucessful (it does not unload or return me to my main movie)


      nope_btn.addEventListener(MouseEvent.CLICK, cancelunloadexitb);

      yep_btn.addEventListener(MouseEvent.CLICK, unloadexitb);



      function cancelunloadexitb(e:MouseEvent):void {




      function unloadexitb(e:MouseEvent):void {





      How do I get back to my main movie? Any ideas... Thank you