Highlighted

How to correctly load an external swf file into iosAir app? I'm getting blank screen.

Community Beginner ,
Mar 15, 2014

Copy link to clipboard

Copied

So this code works flawlesly on Air for Android, it even works fine when I test the movie in Flash, but once I export it, I'm getting a blank screen. I made an swf with a square and withotu any code, and flash still fails to load it. It's weird cause everything works fine when I use the interpreter debugging option, but when I switch to standard debugging the blank screen appears on my ipad. I've read somewhere that it's caused by the way flash saves the link to external files. Thus after the file is compiled Flash fails to find the prefiously added files, which results in a blank screen. There's clearly something wrong with how the process of compiling the application.

Tried this:

var Xpos:Number = 0;

var Ypos:Number = 0;

var loader:Loader = new Loader();

var link:URLRequest = new URLRequest("Untitled-1.swf");

loader.load(link);

addChild(loader);

And this:

var ldr:Loader = new Loader();

ldr.load(new URLRequest("Untitled-1.swf"));

ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded, false, 0, true);

function loaded(event:Event):void {

addChild(event.target.content);

}

But nothing works. I'm still getting a blank screen. Is there any way to add the swf file manually into the descriptor file cause flash most likely messes it up? I don't really want to use through command line.

Adobe Community Professional
Correct answer by Colin Holgate | Adobe Community Professional

Read this article, especially the bit about loadercontext and currentdomain:

http://blogs.adobe.com/airodynamics/2012/11/09/packaging-and-loading-multiple-swfs-in-air-apps-on-ios/

TOPICS
Development

Views

391

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

How to correctly load an external swf file into iosAir app? I'm getting blank screen.

Community Beginner ,
Mar 15, 2014

Copy link to clipboard

Copied

So this code works flawlesly on Air for Android, it even works fine when I test the movie in Flash, but once I export it, I'm getting a blank screen. I made an swf with a square and withotu any code, and flash still fails to load it. It's weird cause everything works fine when I use the interpreter debugging option, but when I switch to standard debugging the blank screen appears on my ipad. I've read somewhere that it's caused by the way flash saves the link to external files. Thus after the file is compiled Flash fails to find the prefiously added files, which results in a blank screen. There's clearly something wrong with how the process of compiling the application.

Tried this:

var Xpos:Number = 0;

var Ypos:Number = 0;

var loader:Loader = new Loader();

var link:URLRequest = new URLRequest("Untitled-1.swf");

loader.load(link);

addChild(loader);

And this:

var ldr:Loader = new Loader();

ldr.load(new URLRequest("Untitled-1.swf"));

ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded, false, 0, true);

function loaded(event:Event):void {

addChild(event.target.content);

}

But nothing works. I'm still getting a blank screen. Is there any way to add the swf file manually into the descriptor file cause flash most likely messes it up? I don't really want to use through command line.

Adobe Community Professional
Correct answer by Colin Holgate | Adobe Community Professional

Read this article, especially the bit about loadercontext and currentdomain:

http://blogs.adobe.com/airodynamics/2012/11/09/packaging-and-loading-multiple-swfs-in-air-apps-on-ios/

TOPICS
Development

Views

392

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
Mar 15, 2014 0
Adobe Community Professional ,
Mar 15, 2014

Copy link to clipboard

Copied

Read this article, especially the bit about loadercontext and currentdomain:

http://blogs.adobe.com/airodynamics/2012/11/09/packaging-and-loading-multiple-swfs-in-air-apps-on-ios/

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...
Mar 15, 2014 0
Sairope LATEST
Community Beginner ,
Mar 15, 2014

Copy link to clipboard

Copied

Thx, the code did the trick.

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...
Mar 15, 2014 0