Guys I am stuck with some kind of problem with this Blackberry playbook of mine which I am desperately thinking of navigating to the other pages. I have tried it by myself using some kind of help from my friends who are very good in all the codings of this navigation of the pages. Although the code is looking good but still I am not able to get the code correct, so guys if some one can look into this code and can find out what exactly is missing out here, please do provide some suggestion through which I can make this thing successful.
Code:
public class Page1 extends Sprite
{
public var page2age2;
public function Page1() {
var btn:Button = new Button();
var lab:Label = new Label();
lab.text = "Click";
btn.addChild(lab);
btn.setPosition(10,50);
btn.addEventListener(MouseEvent.CLICK,dothis);
addChild(btn);
addChild(log);
stage.nativeWindow.visible = true;
}
public function dothis(event:Event):void {
page2 = new Page2();
addChild(log);
}
}
Bookmarks