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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
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!

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

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.

Contributor
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

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

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.