Papa De Beau
Papa De Beau

Reputation: 3828

Android AS3 - "SecurityError: Error #2070: Security sandbox violation: "

I am trying to call an external swf from an Android app but am getting "SecurityError: Error #2070: Security sandbox violation: "

My container code is simple and it works when I call it locally.

CODE FOR CONTAINER SWF calling local Hope.swf - (WORKS)

var my_loader:Loader = new Loader();
my_loader.load(new URLRequest("Hope.swf"));
addChild(my_loader);


CODE FOR CONTAINER SWF calling Network Hope.swf - (DOES NOT WORK)
var my_loader:Loader = new Loader();
my_loader.load(new URLRequest("http://www.MY-WEBSITE.com/hope/upload/php/files/Hope.swf"));
addChild(my_loader);

allow I am using a DROID app so what security domain would I allow if I could.

Am grateful for any help on this mater.

BELOW is the code for my swf on a server I am trying to call:

import flash.media.Sound;
import flash.media.SoundChannel;
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
tree.mouseChildren = false;
hope.mouseChildren = false;
**Event.ADDED_TO_STAGE;**

////////////////////////////

HERE IS THE ERROR I AM GETTING:

SecurityError: Error #2070: Security sandbox violation: caller http://www.MY-WEBSITE.com/hope/upload/p ... s/Hope.swf cannot access Stage owned by app:/testing.swf.
at flash.display::Stage/requireOwnerPermissions()
at flash.display::Stage/addEventListener()
at fl.text::TLFRuntimeTabManager$/onAddedToStage()

Upvotes: 0

Views: 3333

Answers (1)

Emin A. Alekperov
Emin A. Alekperov

Reputation: 1067

Maybe problem is that Hope.swf tries to listen an ADDED_TO_STAGE event dispatched by stage. Try to use Security.allowDomain("*") in the parent swf.

Upvotes: 2

Related Questions