1

I'm working on bringing a game over from Flash to Android using Air 3.2. The SWF I am testing with is an AS2 SWF.

I used this method to get the SWF file to load: http://www.mikechambers.com/blog/2008/08/18/anyone-using-actionscript-2-to-build-air-applications/#comment-13360

However, when I open the app, the SWF loads, but no code works. Here's the APK so you can see it in action.

Is there like a .SWC or something similar I can include to get the code to work?

Thanks, -Sandor

1 Answer 1

0

What you want simply is not possible on mobile.

  1. On iOS, you cannot load AS bytecode in SWFs prior to AIR 3.6. You must package them at compile-time (loading at runtime is against iTunes Store policies and flat out cannot run) and the code in the embedded SWF is cross-compiled to Objective-C with the rest of the APP.

    Because there is no AIR Runtime in an app compiled for iOS (everything is cross-compiled to Objective-C), you cannot load in a SWF with bytecode, even if you do not plan to submit to the iTunes Store. There is no runtime available to actually run it.

    The workaround in your link will not work either since there is not and never was a flash player for iOS, which that relies on

  2. On Android, the AIR runtime is AS3-only. There is no support whatsoever for loading AS2; that runtime simply does not exist.

    Additionally, the little workaround mentioned in the comments of your link will not work either. That workaround relies on the device having Flash Player installed to run the SWF. Adobe dropped Flash Player for Android a few years ago and no device has been able to install it since then. Odds are only a fraction of a percentage of all Android users still have Flash on their phone.

So there is no way to do what you want. You must convert it to AS3 or not support Android and iOS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.