topical media & game development
mobile-graphic-enchant-examples-plugins-widget-NavigationBar-main.js / js
enchant();
window.onload = function() {
var game = new Game(320, 320);
game.onload = function() {
var button1 = new Button('Back'); // 左の項目に配置するボタンを作成
button1.ontouchend = function() {
alert('「Back」がタップされました。');
};
var button2 = new Button('Edit'); // 右の項目に配置するボタンを作成
button2.ontouchend = function() {
alert('「Edit」がタップされました。');
};
/*
* new NavigationBar(center, left, right)
* ナビゲーションバー(ボタンなどを設定できるメニューバー)を作成する。
* 中央、左、右の項目を設定できる。
*/
var navigationBar = new NavigationBar('Navigationbar', button1, button2); // ナビゲーションバーを作成
game.rootScene.addChild(navigationBar);
};
game.start();
};
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.