Skip to main content
Participating Frequently
July 14, 2013
Question

AIR for iOS

  • July 14, 2013
  • 1 reply
  • 631 views

Hello everyone,

I'm developing an app (actually already developed the Android version and it's published in google play store).

The mobile app was developed in Flash CS6 using several FLA files and a main swf file that loads each screen (separate swfs with AS3 code).

I know there were issues with that method in the past (before AIR 3.6). But as I understood, today is possible to load external swfs (packaged within the app) using a loadercontext that is the same domain as the swf container.

Like shown here:

http://blogs.adobe.com/airodynamics/2013/03/08/external-hosting-of-secondary-swfs-for-air-apps-on-ios/

There are a few questions about iOS development:

1 - how do you guys debug? I use Adobe Scout to see the trace logs but each build takes a lot of time and it's not practical.

2 - How do you check for internet connection - every method I tried crashes my app

3 - Any more tips to "discover" why and how the app crashes besides trace prints?

In fact, when I publish my ipa file and run it (without internet connection checks) it loads the first swf needed (the main menu) and the loaded swf does run AS3 code as it should (for instance, I can click buttons and see the trace logs or I see animations etc)

But when trying to dispose the first swf and loading the next one, the app gives the same error 3747 relevant to loading swfs in a different loader context.

Here is my code for loading swfs:

function constructor() {

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

          _lc.allowLoadBytesCodeExecution = true;

          _lc.allowCodeImport = true;

}

 

public function initGame():void

{

          loadScreen("game mode");

}

 

private function loadScreen(screen:String)

{

          if (loader)

          {

                         trace("loader found, let's dispose");

                         disposeContent();

          }

               loader = new SWFLoader(screen + ".swf" , {autoDispose:true,name:screen, onComplete:screenLoadingComplete, container:swfContainer,      context:_lc});

               loader.load();

               currentScreen = screen;

}

Can anyone give me a hint?

I can send all the code , all the project.

I'm even willing to pay someone to help me finish the iOS version...

Thanks

This topic has been closed for replies.

1 reply

Participating Frequently
July 14, 2013

Is there a way to do this in Flash CS6 ?

http://forums.adobe.com/message/5329481

What's static-rsls="true" ?

Thanks


Participating Frequently
July 14, 2013