• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

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

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

TOPICS
Development

Views

485

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
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 15, 2014 Mar 15, 2014

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/

Votes

Translate

Translate
LEGEND ,
Mar 15, 2014 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/

Votes

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
community guidelines
Community Beginner ,
Mar 15, 2014 Mar 15, 2014

Copy link to clipboard

Copied

LATEST

Thx, the code did the trick.

Votes

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
community guidelines