We love choice

Fx{r} is trying to start the Fx{r} Community! Please join our group on Adobe Groups following this link: http://groups.adobe.com/groups/423.
Fx{r} is now on Twitter too. Follow us @ twitter.com/fx_r!
«
»

AIR, ActionScript, Errors, How to, Security

SecurityError: Error #3015: Loader.loadBytes() is not permitted to load content with executable code.

Andrei Ionescu | 27.01.09 | 4 Comments

Google Buzz

Today I managed to find this error twice. It is happening in AIR applications. I had the same application in Flex and then I ported it to AIR. The error that appeared is this:

SecurityError: Error #3015: Loader.loadBytes() is not permitted to load content with executable code.

The error is saying that you’re no more allowed to load executable byte arrays.

To resolve it just use allowLoadBytesCodeExecution property of LoaderContext class like this:

var myLoaderContext:LoaderContext = new LoaderContext();
myLoaderContext.allowLoadBytesCodeExecution = true;
 
var mySwfLoader:SWFLoader = new SWFLoader();
mySwfLoader.loaderContext = loaderContext;
mySwfLoader.addEventListener(Event.COMPLETE, handleLoadComplete);
mySwfLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, handleLoadFault);
mySwfLoader.load(myByteArray);

This is all. Hope this helps you.

Share and Enjoy:
  • Twitter
  • Google Buzz
  • LinkedIn
  • Google Bookmarks
  • del.icio.us
  • Digg
  • Sphinn
  • blogmarks
  • Reddit
  • StumbleUpon
  • Facebook
  • DZone
  • FriendFeed
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • Slashdot
  • MySpace
  • Add to favorites




Tags: , , ,

This post was written by Andrei Ionescu

Views: 4619

related

4 Comments

have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

:

:


«
»