Skip navigation
Currently Being Moderated

Stage access security error for external loaded swf files.

Dec 1, 2011 8:29 PM

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

 

  1. main.swf file in "F:\test\main.swf".
  2. Inside main.swf has stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);

 

1. When i'm publishing the Air application below mentioned (Red color) Error is coming.

2. If i try to call the stage also same error repeating.

 

 

SecurityError: Error #2070: Security sandbox violation: caller file:///F:/test/main.swf cannot access Stage owned by app:/Airfile.swf.

at flash.display::Stage/requireOwnerPermissions()

at flash.display::Stage/addEventListener()

at main_fla::MainTimeline/init()

at main_fla::MainTimeline/frame1()

 
Replies
  • Currently Being Moderated
    Jan 17, 2012 5:25 PM   in reply to kiranemc2

    you have to place this script at the beginning of ur app,

     

    <fx:Script>

        <![CDATA[

            Security.loadPolicyFile("your url folder"); if you use flash ,, place this only at the first frame

        ]]>

    </fx:Script>

     

    else

    global settings in flash player ^_&

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points