Highlighted

Why "*** Security Sandbox Violation ***" message is generated debugging with FlashBuidler ?

Community Beginner ,
Oct 25, 2017

Copy link to clipboard

Copied

My question is about the following message that is generated when debugging with FlashBuidler 4.6.

### console output message ###

*** Security Sandbox Violation ***

SecurityDomain 'http: // localhost: 8400 / hoge / remoteWeb.swf' tried to access incompatible context 'app: /mainAir.swf'

##############################

I am creating air application (mainAir.swf) that loads swf (remoteWeb.swf) from web server and registers it as child component.

(Internally, flash.display.Loader.load() and addChild()).

 

When I launch the application with debugger, The Security Sandbox Violation message are repeatedly generated.

Furthermore, when I click the part corresponding to swf(remoteWeb.swf) on the Air application window, The above message is generated.

Although the above message is generated, my air application seems to be working properly from the following perspectives.

- loaded swf(remoteWeb.swf) are displayed.

- An mouse click eventhandler that I set in loaded swf works.

- When I launch appliction without debugger, It seems to be working normally.

### Question ###

Why the above security error message is generated?

Does this message really mean my air application have any security problems? Im not sure this is real issue or just information.

### Soucre Code ###

------------------------------------------------------------------------------------------

mainAir.mxml (mainAir.swf) # Created as a flex air project

------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>

<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"

xmlns:s="library://ns.adobe.com/flex/spark"

xmlns:mx="library://ns.adobe.com/flex/mx"

creationComplete="onCompleteLoad()"

                       >

<fx:Script>

<![CDATA[

            import flash.net.URLRequest;

            import flash.system.LoaderContext;

            import mx.core.UIComponent;

                  

            private function onCompleteLoad():void {

                trace("Call onCompleteLoad()");  

                var loader:Loader = new Loader();

                var loader_context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);

                loader.load(new URLRequest("http://localhost:8400/hoge/remoteWeb.swf"), loader_context);

                uicomponent.addChild(loader);

            }

          

]]>

</fx:Script>  

<mx:UIComponent id="uicomponent" width="100%" height="100%" >

</mx:UIComponent>

</s:WindowedApplication>

------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------

remoteWeb.mxml  (remoteWeb.swf) # Created as a flex web project

------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

xmlns:s="library://ns.adobe.com/flex/spark"

xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"

               click="onClick()"

               >

<fx:Script>

<![CDATA[      

            private function onClick():void {

                trace("Call onClick() !!!");  

            }

]]>

</fx:Script>

<s:Label text="this is remoteWeb.mxml "/> </s:Application>

------------------------------------------------------------------------------------------

TOPICS
Development

Views

411

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Why "*** Security Sandbox Violation ***" message is generated debugging with FlashBuidler ?

Community Beginner ,
Oct 25, 2017

Copy link to clipboard

Copied

My question is about the following message that is generated when debugging with FlashBuidler 4.6.

### console output message ###

*** Security Sandbox Violation ***

SecurityDomain 'http: // localhost: 8400 / hoge / remoteWeb.swf' tried to access incompatible context 'app: /mainAir.swf'

##############################

I am creating air application (mainAir.swf) that loads swf (remoteWeb.swf) from web server and registers it as child component.

(Internally, flash.display.Loader.load() and addChild()).

 

When I launch the application with debugger, The Security Sandbox Violation message are repeatedly generated.

Furthermore, when I click the part corresponding to swf(remoteWeb.swf) on the Air application window, The above message is generated.

Although the above message is generated, my air application seems to be working properly from the following perspectives.

- loaded swf(remoteWeb.swf) are displayed.

- An mouse click eventhandler that I set in loaded swf works.

- When I launch appliction without debugger, It seems to be working normally.

### Question ###

Why the above security error message is generated?

Does this message really mean my air application have any security problems? Im not sure this is real issue or just information.

### Soucre Code ###

------------------------------------------------------------------------------------------

mainAir.mxml (mainAir.swf) # Created as a flex air project

------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>

<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"

xmlns:s="library://ns.adobe.com/flex/spark"

xmlns:mx="library://ns.adobe.com/flex/mx"

creationComplete="onCompleteLoad()"

                       >

<fx:Script>

<![CDATA[

            import flash.net.URLRequest;

            import flash.system.LoaderContext;

            import mx.core.UIComponent;

                  

            private function onCompleteLoad():void {

                trace("Call onCompleteLoad()");  

                var loader:Loader = new Loader();

                var loader_context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);

                loader.load(new URLRequest("http://localhost:8400/hoge/remoteWeb.swf"), loader_context);

                uicomponent.addChild(loader);

            }

          

]]>

</fx:Script>  

<mx:UIComponent id="uicomponent" width="100%" height="100%" >

</mx:UIComponent>

</s:WindowedApplication>

------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------

remoteWeb.mxml  (remoteWeb.swf) # Created as a flex web project

------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

xmlns:s="library://ns.adobe.com/flex/spark"

xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"

               click="onClick()"

               >

<fx:Script>

<![CDATA[      

            private function onClick():void {

                trace("Call onClick() !!!");  

            }

]]>

</fx:Script>

<s:Label text="this is remoteWeb.mxml "/> </s:Application>

------------------------------------------------------------------------------------------

TOPICS
Development

Views

412

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 25, 2017 0

Have something to add?

Join the conversation