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?
Copy link to clipboard
Copied
use the loadercontext, Adobe Flash Platform * Loading display content dynamically
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?
Copy link to clipboard
Copied
any code in the loaded swf is the issue.
comment-out line 2 in your code and retry.
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?
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.
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
Find more inspiration, events, and resources on the new Adobe Community
Explore Now