03-09-2011 09:44 AM
Solved! Go to Solution.
03-09-2011 09:46 AM
I used the forum's search capability and typed in "AS2" and it gave some results that may have answers to your questions.
Maybe you could review those first and, if for some reason the same answers don't work in your case, come back and clarify why.
03-09-2011 09:51 AM
Thanks for the answer, I did search on the forum, I only got about 3 resaults that gave some kind of help but the didn't work for me, I work with flash cs5 ide and when testing loading the swf on other as3 file it worked, but on the cs5 player, but when tested on the simulator it didn't work, it was just a blank file.
03-09-2011 09:55 AM
I know nothing about CS5, so if the issue is specific to that, I can't help.
I did see several suggestions in this thread which show how it might be done, but which also suggest that it may not work well on the simulator.
We really have no idea yet (based on anything I've read) whether AS2 SWFs would be usable in any way on the PlayBook. If you go that route without seeing it working flawlessly in the simulator, it's probably taking a gamble. (Unless someone else can point us to clear evidence of this working okay.)
03-09-2011 10:00 AM
Oh, if you have the AS2 source (I was assuming it was just in SWF form) then by all means try to recode. The performance could be significantly improved, with all the benefits AS3 brings, and you'll have access to all the QNX stuff, etc.
Note that using "non-strict" mode for the compilation may make that easier, at least at first. I haven't seen anyone doing that, but from what I can tell it should let you make fewer changes at first, at the cost of some performance and probably a few other things.
03-09-2011 10:39 AM
Currently Adobe AIR 2.5 does not have legacy support for AS2 (not even adobe AIR 1.0) because it uses AVM2 (the newest version of the Actionscript Virtual Machine, which was totally refactored).
The good news is that if you own the source code, then you can translate it to AS3 which implies not much effort.
03-09-2011 10:42 AM
@daniel_wind, have you got a reference for that? I ask only because Flash Player 9, where AVM2 was introduced, included legacy support for AS2 by including a complete AVM1 implementation as well, to which it would fall back for AS2 code. (As I understand it.)
I realize AIR is not the same as Flash Player... is that the simple reason for this difference?
03-09-2011 10:56 AM
Yes, the player has fallback method for legacy support, but AIR does not. I think I saw it here:
Anyways, they did not include AVM1 on Adobe AIR I guess to avoid size and legacy issues.
You can however load an as2 generated swf file on as3 wrapper. It seems to work on Android (as stated in that document) and possibly on Playbook too (haven't tested it).
In AIR for Android, you can use the Loader class to load a SWF file and execute its code. (However, ActionScript 2.0 is not supported.) AIR applications for the iPhone cannot execute code in loaded SWF content; AIR for Android does not include this restriction.