Highlighted

trying to load swf from online to air and I get Security Sandbox Violation ***

Community Beginner ,
Dec 29, 2018

Copy link to clipboard

Copied

it doesn't like my file stream stuff or ui scrollpane which saves and loads from documents directory.     all I have is the swf online in my public directory.  Do I need  a class folder?  Or maybe these classes are for local only? 

Views

197

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

trying to load swf from online to air and I get Security Sandbox Violation ***

Community Beginner ,
Dec 29, 2018

Copy link to clipboard

Copied

it doesn't like my file stream stuff or ui scrollpane which saves and loads from documents directory.     all I have is the swf online in my public directory.  Do I need  a class folder?  Or maybe these classes are for local only? 

Views

198

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
Dec 29, 2018 0
Adobe Community Professional ,
Dec 30, 2018

Copy link to clipboard

Copied

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
Reply
Loading...
Dec 30, 2018 0
Community Beginner ,
Dec 30, 2018

Copy link to clipboard

Copied

In the beginning of the document you gave me it says

SWF files that do not contain ActionScript bytecode

is this bytecode?  that is in the document getting loaded

fileStream.open(myFile, FileMode.READ);

var fileText:String = fileStream.readUTF();

So I tried this it won't load it just better checks it, I guess, doesn't throws as many errors but it loads nothing, if I get rid of line 2 it is the same as it was. loads it but doesn't load it right throws tons of errors. 

1. var context:LoaderContext = new LoaderContext();

2. context.securityDomain = SecurityDomain.currentDomain;

3. context.applicationDomain = ApplicationDomain.currentDomain;

4. var urlReq:URLRequest = new URLRequest("http://www.[your_domain_here].com/library.swf");

5. var ldr:Loader = new Loader();

6. ldr.load(urlReq, context);

maybe reading a local xml document from online is not doable?   maybe if I use URL request instead of file class?

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
Reply
Loading...
Dec 30, 2018 0
Adobe Community Professional ,
Dec 30, 2018

Copy link to clipboard

Copied

any code in the loaded swf is the issue.

comment-out line 2 in your code and retry.

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
Reply
Loading...
Dec 30, 2018 0
Community Beginner ,
Dec 30, 2018

Copy link to clipboard

Copied

it doesn't work.  URL request doesn't seem to allow exact path ie("C:\Users\Userid\Documents\XML\addon_xml.xml")   and I wouldn't know the user id anyways. 

maybe the only way to save  or load other data, if your loading a file from online, is online?  maybe sharedobjects works?  but I have never used it for more then one document.  but it must be called shared for reason?

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
Reply
Loading...
Dec 30, 2018 0
Adobe Community Professional ,
Dec 30, 2018

Copy link to clipboard

Copied

you’re conflating loading a swf with loading an xml.  i showed how to load a swf which is what you asked for.

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
Reply
Loading...
Dec 30, 2018 0
Community Beginner ,
Dec 30, 2018

Copy link to clipboard

Copied

not what I meant.  I could load a normal swf.  It gets an error,'I think', because the file I am trying to load is loading xml data  locally through the file class.  Air for security reasons doesn't like this.  I am trying to find a work around so I can have add ons to the program I am making that can save and load to the same place as the original air file

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
Reply
Loading...
Dec 30, 2018 0