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.

New Developer
Posts: 17
Registered: ‎01-14-2011
My Device: Not Specified

Default package & View

Hi everyone,


I am new to Flash builder and I have read the tutorial on creating playbook app using Flash builder.

In the tutorial, I see that we are using action script instead of mxml.   I tried to add a button using action script but nothing shows in the simulator (I only see a white screen).   It is because the mxml file under the views folder is taking control?


If I am using action script file, do I need to delete the Home.mxml that is under the views folder? 

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

Re: Default package & View



In posts like this, it is best to post code or sample code to illustrate the issue. The majority of time, your issue can be quickly resolved if others can see the code.


Couple of questions:

  • What button class are you using?
  • Are you using addChild to add the button to the containing class?


In a pure AS project, your root item would be an .as file too and not an MXML file.  When creating the project with the wizard, the last panel will show the default/root class name.  In your case, that was probably "Home.mxml".  Simply rename that to "Home.as" and everything gets created properly.  If you already have a project, it is easier to delete it and create a new project.  Be certain to give your project a unique (reverse DNS) id (e.g. com.mydomain.home).  You can alwasy change it later, but you may as well do it here.


Hope that helps.

New Developer
Posts: 17
Registered: ‎01-14-2011
My Device: Not Specified

Re: Default package & View

I put the following code in my .as file and leave the Home.mxml file unchanged.  I am using  Burrito.


import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.TransformGestureEvent;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;
import flash.filesystem.File;
import qnx.dialog.*;
import qnx.display.IowWindow;
import qnx.ui.buttons.LabelButton;
import qnx.ui.core.*;
import qnx.ui.data.DataProvider;
import qnx.ui.listClasses.List;
import qnx.ui.listClasses.ListSelectionMode;
import qnx.ui.listClasses.ScrollDirection;
import qnx.ui.skins.SkinStates;
import qnx.ui.text.*;
[SWF(height="600", width="1024", frameRate="30", backgroundColor="#FFFFFF")]
public class Test2 extends Sprite
private var endButton:LabelButton;
public function Test2()
endButton = new LabelButton();
endButton.label = "Exit";
endButton.size = 100;
endButton.sizeUnit = SizeUnit.PIXELS;
endButton.sizeMode = SizeMode.BOTH;
endButton.addEventListener(MouseEvent.CLICK, endButtonOnClick);
public function endButtonOnClick(eventSmiley Surprisedbject):void



Trusted Contributor
Posts: 108
Registered: ‎12-28-2010
My Device: Free PlayBook
My Carrier: Verizon

Re: Default package & View

Try addChild(endButton); to add your button to the display list.

New Developer
Posts: 17
Registered: ‎01-14-2011
My Device: Not Specified

Re: Default package & View

thanks.  Now I see my button.  Back to my original question, what does the Test2Home.mxml do?

Posts: 138
Registered: ‎01-09-2011
My Device: Blackberry Tablet OS

Re: Default package & View

[ Edited ]

I believe you want to be working with just ActionScript which means that you shouldn't have any MXML files in your project. What you can use a MXML file for though is to easily design the appearance of your application. Flash Builder provides a WYSIWYG editor for MXML.


EDIT: @jtegen how do you edit the reverse DNS name without creating a new project? (Flash Builder Burrito)

Noah NU
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Default package & View

@noah: In ur project list look for your -app.xml descriptor file. open that up and look for the ID tag. you can change that to anything you want.

J. Rab (Blog) (Twitter)
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman