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

External Swf on Android Air and IOS Air

New Here ,
Feb 09, 2014 Feb 09, 2014

Hello

Can android AIR and IOS AIR app download and play external SWF with code inside?

I have created android AIR app(SDK version 4.0) which load external swf with simple movie clip on the scene.

var loader:Loader=new Loader();

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

loader.load(new URLRequest("2.swf"));

function onLoaded(e:Event):void

{

     addChild(loader);

}

I have installed this android AIR app on device but i do not see external swf on the scene.

Thanks in advance

TOPICS
ActionScript
2.6K
Translate
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

Community Expert , Feb 09, 2014 Feb 09, 2014

you must add the external swf to the included files.  and for ios you must assign the loadercontext property.

Translate
Community Expert ,
Feb 09, 2014 Feb 09, 2014

you must add the external swf to the included files.  and for ios you must assign the loadercontext property.

Translate
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
New Here ,
Feb 09, 2014 Feb 09, 2014

So for ios as3 code must be like this one.?

var _urlRequest:URLRequest = new URLRequest("2.swf");

var _loader:Loader = new Loader();

var _lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);

_loader.load(_urlRequest, _lc);

addChild(_loader);

One more question: How exactly  i can add the external swf to the included files?

Can you give link with information or some sample? Also, does it work on Android Air?

If you have sample for ios Air or for Andoid Air i will be very appreciative.

Sorry for my english.

Translate
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 Expert ,
Feb 09, 2014 Feb 09, 2014

yes, to your loadercontext question.

and in the edit application settings > general tab is an included files text area where you can add files and directories.

Translate
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
New Here ,
Feb 09, 2014 Feb 09, 2014

Thanks for information

Translate
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 Expert ,
Feb 09, 2014 Feb 09, 2014
LATEST

you're welcome.

Translate
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