kosmo
kosmo

Reputation: 165

AIR iOS load external swf ABC - almost succeeded

I have an entire day of searching and testing behind me and I officialy think it's impossible. Yet there is left to share what I've accomplished and ask for any sugestions.

So I'm working on Flash Builder 4.7, AIR SDK 3.5 and iPad 3 iOS 6.0.1. What I want is to have an ad-hoc application to load a swf file containing actionscript and add it to stage. I started by testing the application in debug mode on device connected by usb. Everything works well. Then I compiled an ad-hoc release build, which did not work that well. Graphics was added to stage but actionscript didn't run. I've started to search the web and found out that it was possible to load swf's packed in ipa that could run actionscript, but it is no more, though there was a link to the download page of that SDK version under "Where can I get the build?"

It didn't work. I included the second swf in export package contents. Did I do it wrong? Anyway even if it worked what I actually need is to be able to download a swf from a server, save it in storage directory and then load it to the main application.

Is there maybe a way to tell iOS that the application it's running is a debug version (that's actually working), but it shouldn't display the popup with information about connecting to a debugger and it actually should run fast like a legit release build?

Upvotes: 2

Views: 2676

Answers (2)

We've found that loading SWFs with ABC code in iOS can be done without any problem with Flash Builder 4.7 and AIR 3.6 SDK. At this time Adobe Flash Builder 4.7 comes with AIR 3.5 SDK, so you can download the last SDK version from here and install it into your Adobe Flash Builder sdks folder.

Upvotes: 0

borisgolovnev
borisgolovnev

Reputation: 1800

Unfortunately you can not load any code from any server to execute it. Apple forbids it. The only code that can be loaded from outside and executed on iOS is JavaScript within the built in WebKit browser (using UIWebView or in case of Air - StageWebView).

As of air 3.6 (which is still in beta) you can package additional swfs with your application for later loading with Loader class, but this feature is still severely limited compared to normal web swf loading - you are only allowed to load code to the same ApplicationDomain your application uses and you can not unload anything so it is just easier to link all the code to one swf statically using swc libraries for example and not bother with loading anything.

Upvotes: 1

Related Questions