1 Reply Latest reply on Dec 17, 2011 11:10 AM by EverestJ

    using Loader.unloadAndStop

    EverestJ

      here is my code:

       

      stop();

       

       

      import flash.display.Loader

             

       

              import flash.net.URLRequest

             

       

              import flash.events.Event

             

       

           

             

       

              var myLoader:Loader = new Loader();

             

       

              myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,function(e:Event){

             

       

              addChild(myLoader);

             

       

              });

             

       

              myLoader.load(new URLRequest("name of my external video here"));

             

       

              btnUnload.addEventListener(MouseEvent.CLICK,function(){

             

       

              // Calling this method will unload and recursively stop the content of the movie.

             

             

              myLoader.unloadAndStop();

             

       

              });

       

      I keep getting an error saying

      SecurityError Error 2000 Bi Active security context

       

      Any clue how to fix this and make my external swf unload on the event of a button being clicked?  Thanks!