Jump to content
Search Community

Air and LoaderMax

Lebe80 test
Moderator Tag

Recommended Posts

Hi,

 

Air gives me SecurityError while trying to load local images, swf's and etc (under Air application directory), via LoaderMax.

The error doesn't occur when I publish the file in Flash 10 format.

 

SecurityError: Error #3207: Application-sandbox content cannot access this feature.

at flash.system::Security$/allowDomain()

at com.greensock.loading.core::DisplayObjectLoader/_load()[D]

at com.greensock.loading::SWFLoader/_load()[D]

at com.greensock.loading.core::LoaderCore/load()[D]

at com.greensock.loading::LoaderMax/_loadNext()[D]

at com.greensock.loading::LoaderMax/_auditSize()[D]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at com.greensock.loading.core::LoaderItem/_auditStreamHandler()[D]

The code i used was copy/pasted from LoaderMax's page:

 

import com.greensock.*;
import com.greensock.loading.*;
import com.greensock.events.LoaderEvent;
import com.greensock.loading.display.*;

//create a LoaderMax named "mainQueue" and set up onProgress, onComplete and onError listeners
var queue:LoaderMax = new LoaderMax({name:"mainQueue",onProgress:progressHandler,onComplete:completeHandler,onError:errorHandler});
//append several loaders
queue.append( new SWFLoader("swf/test.swf", {name:"mainClip", container:this}));
queue.load();



function progressHandler(event:LoaderEvent):void {
trace("progress: " + event.target.progress);
}
function completeHandler(event:LoaderEvent):void {
//var image:ContentDisplay = LoaderMax.getContent("mainClip");
//TweenLite.to(image, 1, {alpha:1, y:100});
trace(event.target + " is complete!");
}
function errorHandler(event:LoaderEvent):void {
trace("error occured with " + event.target + ": " + event.text);
}

 

I've read the other thread, but it didn't help me.

 

The loaderMax would give me so much advantage to create a project with Air, but somehow I don't get it to work with each other.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...