2 Replies Latest reply on Dec 30, 2011 12:23 AM by Deepu

    External loaded swf files,Stage access and security error


      Hai... anybody please help its URGENT


      How to catch this error and block this type of swf



      I am loading sample.swf file. into my air Application. through SWFLoader


      sample.swf file in "C:\Documents and Settings\chacochir\My Documents\swf\sample.swf "

      Inside sample.swf has stage.addEventListener(MouseEvent.MOUSE_DOWN,mouseDown);


      My code is



      <mx:SWFLoader x="50" y="50" id="sL" complete="sL_completeHandler(event)"  />

      <mx:UIComponent id="mc" x="0" y="0"/>






      private var moviepath:String=File.documentsDirectory.nativePath+"/swf/sample.swf";


      protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void





      protected function sL_completeHandler(event:Event):void


            private var mvc:MovieClip=new MovieClip;

            mvc= event.target.content as MovieClip;







      The following wrror occures,  How to catch this error and block this type of swf (Show Alert message)



      SecurityError: Error #2070: Security sandbox violation: caller file:///C:%5CDocuments%20and%20Settings%5Cchacochi%5CMy%20Documents/swf/sample.swf

      cannot access Stage owned by app:/sample.swf.

      at flash.display::Stage/requireOwnerPermissions()

      at flash.display::Stage/addEventListener()

      at sample_fla::MainTimeline/init()

      at sample_fla::MainTimeline/frame1()