»

11月 18

as3 タブメニューパネル

作ってみました。
flashPlayer9以上

This movie requires Flash Player 9

TabPanelクラスのDLはこちら

↓使い方

var test:Sprite = new Sprite();
test.graphics.beginFill(0xff8888, 0.5);
test.graphics.drawRect(0, 0, 500, 400);
test.graphics.endFill();

var test2:Sprite = new Sprite();
test2.graphics.beginFill(0x88ff88, 0.5);
test2.graphics.drawRect(0, 0, 500, 400);
test2.graphics.endFill();

var tab:TabPanel = new TabPanel(520,420, 0xf0f0f0);
tab.addPanel(test, 'てすとてすと');
tab.addPanel(test2, 'テストテストテスト');
addChild(tab);

■ 解説

  1. new TabPanel インスタンスを作成して初期値(サイズとカラー)を入れます。
  2. tab.addPanel 第一引数は貼り付けるdisplayObject、第二引数はタブに表示されるテキスト
  3. addChildして終了

コメントを残す

メールアドレスが公開されることはありません。

次の HTMLタグおよび属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>