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

Can't Load Downloaded Swf Files to AIR App

Community Beginner ,
Sep 30, 2016 Sep 30, 2016

Copy link to clipboard

Copied

Hi,

I'm using MyFlashLab "Download Manager" ANE file for download SWF files to directories. (https://github.com/myflashlab/downloadManager-ANE/)

I'm creating application for Android, it will load other downloaded swf files. (Interactive Book Application, load other books when user buy)

Download Manager ANE download my swf files to "/storage/emulated/0/downloads/" directory.

But i cant load swf files to stage.

It create this error after loading: TypeError: Error #1009: Cannot access a property or method of a null object reference.

Any solution please write.

Thank you

MY CODES:

var f:File = File.documentsDirectory;

f = f.resolvePath("downloads/test.swf");

loader = new Loader();

loader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfComplete);

loader.load(new URLRequest(f.url));

public function swfComplete(e:Event){

       try{

          addChild(loader);

       }catch(err:Error){

           trace(err);

       }

}

TOPICS
Development

Views

1.6K

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
Guest
Sep 30, 2016 Sep 30, 2016

Copy link to clipboard

Copied

A few questions for you. What device are you testing on? What version of Android is it running (4.4, 5.0, 5.1, etc)? Do you have the "WRITE_EXTERNAL_STORAGE" permission set for your app? Lastly, a possibly dumb question, do you know for a fact that the "test.swf" file is located in the "downloads" folder?

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 ,
Sep 30, 2016 Sep 30, 2016

Copy link to clipboard

Copied

- Galaxy Tab 3 - SM-T310

- 4.4.2

- I have WRITE_EXTERNAL_STORAGE permission

- I can see test.swf file on downloads folder with File Explorer.

- I trace file url and size. It shows right place and correct size before start loading.

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 ,
Oct 02, 2016 Oct 02, 2016

Copy link to clipboard

Copied

If loaded swf has no Main class, it loaded perfect and works. (I tested with empty only has colorful circles swf)

But if swf has Main class, always gives errors.

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
Adobe Employee ,
Oct 02, 2016 Oct 02, 2016

Copy link to clipboard

Copied

Hi Efe,

Please refer to below blogs on loading another external swf file as assets:

ApplicationDomain - Adobe ActionScript® 3 (AS3 ) API Reference

How to load external SWF files for Adobe Flash Player

Kindly let us know if it helps you.

Thanks,

Adobe AIR Team

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 ,
Nov 01, 2016 Nov 01, 2016

Copy link to clipboard

Copied

LATEST

Hi,

Do you know this question answer:

Multitouch Not Working

Thank you

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