and it worked fine even before changing the width to 1024 and got a yellow background. maybe you arent inserting that bit of code into the rite place. what is the exact code you are writing for your app?

Edit #2: i just noticed you were missing the Sprite class import in your initial code. copy and paste the following code:

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!

Re: How to change the screen background color ?

here is what i pasted in the other thread that seems to pertain to this thread too.

again assuming all your classes are set up this should run:

package
{
//Remember to import all of the classes that you
//are using
import flash.display.Sprite;
import flash.events.MouseEvent;
import qnx.ui.buttons.LabelButton;
// The following metadata specifies the size and properties of the canvas that
// this application should occupy on the BlackBerry PlayBook screen.
[SWF(width="1024", height="600", backgroundColor="#FFF000", frameRate="30")]
public class Page1 extends Sprite
{
private var page2:Page2;
public function Page1()
{
//initiate new object here to use later
page2 = new Page2();
var labButton:LabelButton = new LabelButton();
labButton.label = "Click";
labButton.setPosition(10,50);
labButton.addEventListener(MouseEvent.CLICK,dothis);
addChild(labButton);
//addChild(log); //dont know where you declared this so commented out
stage.nativeWindow.visible = true;
}
//change the event to MouseEvent since that is what you
//are listening for
public function dothis(event:MouseEvent):void {
addChild(page2);
//addChild(log); //dont know where you declared this so commented out
}
}
}

remember to import all your class definitions inlcuding Sprites, Events, etc. also remember whatever event you are listening for you have that same event in your listener. good luck!

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!