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
Contributor
braden
Posts: 23
Registered: ‎12-08-2010
My Device: Pearl 9100/Playbook (sim)
Accepted Solution

convert adobe flex web app into air app for playbook?

[ Edited ]

hey, I'm very new to this stuff and was using a visual tool to help me create flex web apps. My question is can I convert these to run as air apps on the playbook?


Since I don't really know action script.


Also, can you recommend any good books, tutorials or interactive websites that would help me learn action script? Thanks!

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: convert adobe flex web app into air app for playbook?

There are a lot of resources on the web regarding Action Script.  If you've created Flex applications, then you are dealing with Action Script within the <script> section of your MXML files.  All the attributes in MXML are just the same as methods on classes in ActionScript.

 

In theory, an AIR application written in MXML can be easily ported to PB BB SDK, but the files size and startup time will be larger.  It is best o start to optimize your PB application by leveraging the QNX library in the BB SDK.  MX controls are not very useful when the pointer is your finger instead of a mouse.

 

This forum has been very cooperativee.  Ask any questions you need to go your application converted.

Please use plain text.
Contributor
braden
Posts: 23
Registered: ‎12-08-2010
My Device: Pearl 9100/Playbook (sim)

Re: convert adobe flex web app into air app for playbook?

Thanks! I would like to try and convert it to the playbook  just to try it performance wise, I've created a simple windows with the visual tool and heres the code in the script tag of the mxml file: 

 

 

import mx.controls.Alert;
import mx.events.CloseEvent;
//EndImports
//EndOfGlobalVariables
private function iscApp1Launched():void
{
iscWindow3()
//iscApp1Launched
}
private function iscAppQuit2():void
{
//iscAppQuit2Done
}
private function iscWindow3ButtonClicked():void
{
iscAppQuit2();
//iscWindow3ButtonClicked
}
private function iscWindow3():void
{
iscWindow3Window1.visible=true;
//iscWindow3Done
//iscWindow3Opened
}
private function iscWindow3Closed():void
{
//iscWindow3Closed
}
//EndOfFunctions
]]>

 

import mx.controls.Alert;import mx.events.CloseEvent;//EndImports
//EndOfGlobalVariables
private function iscApp1Launched():void{iscWindow3()//iscApp1Launched}
private function iscAppQuit2():void{//iscAppQuit2Done}

private function iscWindow3ButtonClicked():void{iscAppQuit2();//iscWindow3ButtonClicked}

private function iscWindow3():void{iscWindow3Window1.visible=true;//iscWindow3Done//iscWindow3Opened}

private function iscWindow3Closed():void{//iscWindow3Closed}

//EndOfFunctions
]]>

 

The question is now: how can I get it into a form the PlayBook will run and put it in an air app?

 

Thanks!


P.S. I am using Ubuntu 10.10

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: convert adobe flex web app into air app for playbook?

[ Edited ]

Some MX controls (OK, many) are not supported under the BB SDK.  For example mx.Alert will not work, you have to use the QNX AlertDialog class.  See QNX docs at:

 

http://www.blackberry.com/developers/docs/airapi/1.0.0/index.html

 

Also, FlashBuilder is the IDE that is supprted, Flex Builder (3.x) is not supprted.  FlashBuilder 4.x is what you need but that is not supported under Linux.  You should be able to download the 0.9.1 BB SDK to Linux and use the build CLI to get a project going.

 

If you're a Flex application, you will need to change the root node to an AIR node (Application or WindowedApplication) (if not done so already).  If you're doing that, plus taking out the MX controls that are not supported, I would retain your business logic and just change the front end with native QNX/BB controls.

 

But first, I would just try getting a "Hello World" application to compile and run as an AIR application and then send it over to the simulator to get your feet wet.  then see what it would take to get your app ported.

 

Hope that helps.

Please use plain text.