Update. This is a good option if you do not plan on using some the BlackBerry Playbook API’s. Great for games and projects that do not rely on deep integration of the API’s. Some, but not all of the API’s are suitable for Flash Pro.
Update @renaun Another good article on Building BlackBerry Playbook Apps here
As of now, the only “built-in” option to compiling Blackberry apps for the Blackberry Tablet is using Flash Builder 4. This process if straightforward, but what if you do not have Flash Builder 4 or if you have it and not comfortable using Flash Builder. Let’s just say you are a Flash Professional Pro! During Adobe MAX, it was mentioned that Blackberry was working on an update for Flash Professional that will allow you to use Flash Pro to compile Blackberry Apps. But, right now if you are only using Flash Professional then you are sort of “in the dark”.
Well, this tutorial will give you some insight on a workaround, until the update is released. First lets start with some basics.
- Blackberry Apps have a “.bar” extension
- SWF files are compiled to a “bar” file
- You must use the Blackberry Tablet simulator
- You must use VMware Fusion for MAC or VMware Player for Windows
Installing and configuring you computer to run the BlackBerry Tablet Simulator here
- Install the Blackberry Tablet OS SDK for Adobe AIR. here
- Install VMware Fusion for MAC or Windowshere
- Install/Configure the Blackberry Tablet simulator. here
- Enable Development Mode on the Blackberry Tablet simulator. here
- Retrive the IP address for the BlackBerry Tablet Simulator . The IP addresss in the Simulator is used to transfer your BlackBerry App to the simulator. here
After the above steps are completed, you now can create and test your Apps on the BlackBerry tablet Simulator.
By default, our next steps would be to create a Flash Builder Project, compile and test it on the Simulator. But we are going to use Flash Professional CS5.
Overview – The steps to create BlackBerry Apps using Flash Professional CS5.
- Create a new .fla file.
- Set the stage size to match the resolution of the BlackBerry Tablet. 1024 x 768
- Create you Flash project as normal. Set your publish settings to Flash Player 10. (It is not necessary to set your Publish settings for AIR 2.5 or AIR for Android. The xml files that are generated from these publish settings are not compatible with the BlackBerry Tablet/Simulator)
- Publish your project to create a “.swf” file.
- Create a Adobe AIR Application Descriptor File. “appname-app.xml”. You can download a template of the XML file here. Save the file in the same folder of your “swf” file. You will have to change a few of the tags to match the name of your application. These tags are in different areas within the xml file.
- Create a folder called “icons” and create three “.png” files.
- Three sizes: 36 pixels, 48 pixels, and 72 pixels
- Name them: icon36.png, icon48.png, and icon72.png
- Using the command line, compile your application. Using Terminal on MAC or MS-DOS prompt on Windows.
- Navigate to the folder where your files are located.
- Run the following command, replace “appname” with the name of your application.
<id>appName</id>
<filename> appName </filename>
<name> appName </name>
<content>appName.swf</content>
The command will take your swf/xml/icons and compile it to a “.bar” file. It will then install it on the BlackBerry Tablet Simulator and run your application.
Happy Developing! Flash Rocks!
Pingback: Tweets that mention Using Flash Professional to create Apps for the BlackBerry Playbook « -- Topsy.com
Pingback: @renaun posts: Building BlackBerry PlayBook Apps with Flash Professional CS5
#1 by Almog on December 11, 2010 - 4:34 pm
Quote
This is great, are you able to deploy a full application with signatures and certificate this way?
#2 by The Chef on December 17, 2010 - 10:02 pm
Quote
Yes, but I’ve heard the details are coming out soon.
#3 by Larry on December 30, 2010 - 2:50 am
Quote
It seems the app icon hasn’t been packed into the bar file. In the video record, I can see the demo icon still uses the default icon. I also tried on my side and the icon stuff doesn’t work. How to add icons?
#4 by The Chef on December 31, 2010 - 7:30 pm
Quote
I have not even tried to add icons. The SDK is very early and they have just started to approve apps ( I guess). I think we will hear more about this very shortly. Also, there is a section in the xml that will allow you to add icons, but I have not tested it to see if it works.
#5 by Scott Rapson on January 3, 2011 - 11:14 am
Quote
Hi. Thanks for the great guide, but it’s not working for me at all…
I have been able to successfully build and run from flash builder burrito, but I can’t seem to be able to work with fb4 on anything larger than small tests…
I have the eventual goal to port my flash iphone game to the playbook, it has no device specific code and would run well… if i could get it running
I’ve been trying these and many other steps, and compiling from the command line can get my application installed, but when it looks like it finishes loading, it quits back to the main menu.
Is this a known issue/ any ideas?
Thanks in advance
#6 by The Chef on January 3, 2011 - 4:42 pm
Quote
Currently the process if tricky, I’m sure it will improve.
One thing for me to resolve the Playbook emulator issues, is to do a Virtual Machine Restart. This sometimes clears our previous builds, etc. By doing this it will reset the Playbook. It also my reset your VM’s IP address and “development mode”. So you may have to turn that back on.
You should be able to take any SWF and compile it. The only thing to keep in mind is the screen resolution.
#7 by Mike on January 9, 2011 - 9:30 pm
Quote
Hi,
Can you use CS4 or does it have to be CS5? Thanks!
#8 by The Chef on January 13, 2011 - 6:20 pm
Quote
Technically, you can use CS4, if you are using the command line to compile your app. All you need is a valid .swf file. Currently, if you are using Flash Pro, the only way to compile for Playbook is to use the command line.
#9 by mohsin on January 19, 2011 - 11:34 am
Quote
i have tried all process but i have encounter with one error
1046:type was not found or was not a compile time consatant :Tween
i am running this in flash pro
please help me to solve this problem………
#10 by Prasad on May 31, 2011 - 7:23 pm
Quote
Right so to get the icons on the playbook I used the above line of code mentioned, but then I edited my appname-app,xml file to include the following:
image1.png
image2.png
image3.png
image4.png
image5.png
image6.png
I tested it on the actual playbook and it worked. However, my icon very similar in orientation to another one of my apps that i compiled differently. The problem is that I want the icons that display on the playbook to be the same size. But the icon resolution needs to be 86×86, which is none of the above dimensions. I tried adding a 86×86 tag and it gave me an error.
#11 by Prasad on May 31, 2011 - 7:25 pm
Quote
whoops, the xml didn’t show. If you go to the example file in the article and look for an “icon” xml tag you will find it.
#12 by Prasad on May 31, 2011 - 8:39 pm
Quote
Alright so I was able to solve my problem by going into the manifest.MF file inside the bar, and changing the entry-point-icon value to the location of my correctly sized icon.
#13 by Aldo on July 26, 2011 - 9:48 pm
Quote
I guess you made a mistake in typing.
Blackberry’s tablet resolution is 1024 x 600 (not 768).
#14 by d on March 27, 2012 - 12:07 pm
Quote
Its not working for me. It gives c:/program’ is not recognized as an internal or external command, operable program of batch file…How abt this error plz help..