Air application running only in builder environment
I have an air application that loads a swf ( built in flex ) , this swf loads moduls and basicaly my air application is a testing environment for this swf .
when i run it in flex environment ( eclipse ) it runs fine , when i run it from my programs ( as an air program ) it gets stuck , what i was thinking is that it has to do with security issues because it gets stuck when my main sw开发者_StackOverflow中文版f try to loads the moduls . is the air sandbox security different then flex ?
Thanks
When an application is installed, all files included within an AIR installer file are installed onto the user's computer into an application directory. All files within the application directory tree are assigned to the application sandbox when the application is run. Content in the application sandbox is allowed the full privileges available to an AIR application, including interaction with the local file system.
Many AIR applications use only these locally installed files to run the application. However, AIR applications are not restricted to just the files within the application directory — they can load any type of file from any source. This includes files on the user's computer as well as files from external sources, such as those on a local network or from the Internet. File type has no impact on security restrictions; loaded HTML files have the same security privileges as loaded SWF files from the same source. (However, content in the application sandbox is restricted from loading JavaScript files from outside that sandbox. Details are provided in the developer documentation.)
Content in the application security sandbox has access to AIR APIs that content in other sandboxes is prevented from using. For example, only content in the application security sandbox can read and write to the local file system.
Some JavaScript techniques exist for dynamically transforming strings into executable code. Content in the application security sandbox can only use these techniques while code is loading from application URLs. Using these techniques within the application sandbox would pose a security risk. For example, an application could inadvertently execute a string loaded from a network sandbox, and that string may contain malicious code, such as code to delete or alter files on the user’s computer or to report back the contents of a local file to an untrusted network domain. Details are provided in the developer documentation.
If the SWF is not in the Air applications sandbox (ie the Application folder) than it cannot cross-script with the AIR file. Here is the detailed description.
精彩评论