belartdes
14.01.2011, 18:57
собственно вот код:
function linkUs_function(e:ContextMenuEvent):void{
navigateToURL(new URLRequest("http://сайт.ru/"), "_blank");
}
function btnClick(e:MouseEvent):void{
navigateToURL(new URLRequest("http://сайт.ru"),"_blank");
}
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
var astroMenu = new ContextMenu();
astroMenu.hideBuiltInItems();
root.menu = astroMenu;
var astroMenuItem1 = new ContextMenuItem("Designed by ");
astroMenuItem1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, linkUs_function);
astroMenu.customItems.push(astroMenuItem1);
(this.getChildByName("Li_nn") as InteractiveObject).addEventListener(MouseEvent.CLICK,btnClick);
заканчивает работу с ошибкой Scene 1, Layer 'Layer 21', Frame 1, Line 13 1119: Access of possibly undefined property menu through a reference with static type flash.display:DisplayObject.
в чём косяк?
Зарание спасибо
function linkUs_function(e:ContextMenuEvent):void{
navigateToURL(new URLRequest("http://сайт.ru/"), "_blank");
}
function btnClick(e:MouseEvent):void{
navigateToURL(new URLRequest("http://сайт.ru"),"_blank");
}
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
var astroMenu = new ContextMenu();
astroMenu.hideBuiltInItems();
root.menu = astroMenu;
var astroMenuItem1 = new ContextMenuItem("Designed by ");
astroMenuItem1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, linkUs_function);
astroMenu.customItems.push(astroMenuItem1);
(this.getChildByName("Li_nn") as InteractiveObject).addEventListener(MouseEvent.CLICK,btnClick);
заканчивает работу с ошибкой Scene 1, Layer 'Layer 21', Frame 1, Line 13 1119: Access of possibly undefined property menu through a reference with static type flash.display:DisplayObject.
в чём косяк?
Зарание спасибо