Quantcast
Channel: Adobe Community : Popular Discussions - Archived Discussions
Viewing all articles
Browse latest Browse all 21156

load local SWF files, security sandbox, stage access HELP!!!!

$
0
0

I have many SWF files that do the following:

     - reference the stage

     - load in external swfs and FLVs and XMLs

 

It seems that for the most part loading them in VIA the Loader Class (AS3 not Flex) works except that sometimes I get security sandbox errors that I believe are being caused by those swfs wanting access to the "this" or "stage" variables.

 

What is the "Proper" way to do this. What I want is this:

For my AIR app to load in a list of LOCAL swf files and provide me the ability to play each one back as I see fit.

 

Here's the coding I'm using to load each in, this is in a loop iterating through a file listing array:

 

var file:File = File.desktopDirectory.resolvePath(finalListingArray[topicNum].nativePath);    
var loader:Loader = new Loader();          
loader.contentLoaderInfo.addEventListener(Event.INIT, stopLoadedContent);
loader.load(new URLRequest(file.url)); 
tmpTopic.addChildAt(loader,0);

 

 

tmpTopic is a container MC that I'm adding the resulting loaded swf into.

finalListingArray is my file listing

topicNum is the current item in that array.

stopLoadedContent is a function that tells each SWF to stop playing it's content.

 

Here is one of the errors I'm getting:

SecurityError: Error #2070: Security sandbox violation: caller file:///pathToMySWF/fileBeingLoaded.swf cannot access Stage owned by app:/MyAirApp.swf.     at flash.display::Stage/set quality()     at fileBeingLoaded_fla::sceneMC1_3/frame2()

 

PLEASE HELP!


Viewing all articles
Browse latest Browse all 21156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>