Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Contributor
ilovepixel
Posts: 6
Registered: ‎03-09-2011
My Device: PlayBook
Accepted Solution

Loading AS2 file on BlackBerry Playbook ( Question )

 

Hello,
I am new here, and also developing blackberry apps.
I was wondering if there is a way of loading an as2 swf file on a bb playbook, or has anyone successfully loaded one on it.
If it's not possible directly, is there some other way this could be done?
Thanks, I hope someone can help me with this.

 

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Loading AS2 file on BlackBerry Playbook ( Question )

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.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
New Contributor
ilovepixel
Posts: 6
Registered: ‎03-09-2011
My Device: PlayBook

Re: Loading AS2 file on BlackBerry Playbook ( Question )

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.

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Loading AS2 file on BlackBerry Playbook ( Question )

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.)


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
New Contributor
ilovepixel
Posts: 6
Registered: ‎03-09-2011
My Device: PlayBook

Re: Loading AS2 file on BlackBerry Playbook ( Question )

Ok Thanks,

I'll just have to keep trying , or re-code my app.

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Loading AS2 file on BlackBerry Playbook ( Question )

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.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
New Developer
daniel_wind
Posts: 56
Registered: ‎02-07-2011
My Device: BB Playbook

Re: Loading AS2 file on BlackBerry Playbook ( Question )

Hi,

 

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. 

 

Thanks,

-------------------------------------
www.danielwind.net

Playbook App:
Grab Da Crab
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Loading AS2 file on BlackBerry Playbook ( Question )

@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?


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
New Developer
daniel_wind
Posts: 56
Registered: ‎02-07-2011
My Device: BB Playbook

Re: Loading AS2 file on BlackBerry Playbook ( Question )

Hi Peter,

 

Yes, the player has fallback method for legacy support, but AIR does not. I think I saw it here:

 

http://kb2.adobe.com/cps/868/cpsid_86822.html

 

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.

-------------------------------------
www.danielwind.net

Playbook App:
Grab Da Crab