トップへ戻るニュースフォーラムFLASH-ML 過去ログBak@Flaダウンロードよくある質問と答
ログイン
ユーザ名:

パスワード:


パスワード紛失

新規登録
メインメニュー
メイン
   コーダーズルーム【スクリプト系】
     ActionScript でボタンが表示できない
投稿するにはまず登録を

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
knagai
Åê¹ÆNo.25904
投稿日時: 2006-6-4 12:03
職人
居住地: 白馬村
投稿: 796
使用環境:
Re: ActionScript でボタンが表示できない
横入りですいません。
FAMEというのが面白そうでしたので、自分で試してみました。
参考にしたチュートリアル
http://www.communitymx.com/content/article.cfm?cid=F3ECF&print=true

2つとも当方の即席の環境では動作する模様です。

Buttonコンポーネントをライブラリに置いて書き出したSWFが必要です(つまりFlash IDEが要る)。

import mx.controls.Button;
class jp.himco.ButtonCreate {
	private var myBtn2:Button;
	
	function ButtonCreate() {
		Flashout.log("constructor invoked");
			}
	public static function main() {
		var b:ButtonCreate = new ButtonCreate();
		b.create();
	}
	public function create():Void {
		myBtn2 = Button(_root.attachMovie("Button", "myBtn2", 1, {_width:100, _height:22}));
		myBtn2.label="がんばれ日本!";
	}
}



ひろゆきさんの指摘を含めたスクリプト

class jp.himco.ButtonCreate {
	static function main() {
		var app:ButtonCreate = new ButtonCreate(_root);
	}
	function ButtonCreate(mc:MovieClip) {
		mc.createTextField("txtField", mc.getNextHighestDepth(), 10, 10, 40, 40);
		mc.txtField.html = true;
		mc.txtField.wordWrap=true;
		mc.txtField.htmlText =
 "<a href='http://www.yahoo.co.jp'><img src='button.jpg' border='0' width='30' height='30'></a>";
	}
}


----------------
永井勝則:
himco.jp :

フラット表示 前のトピック | 次のトピック

題名 投稿者 日時
   ActionScript でボタンが表示できない u_routine 2006-6-3 16:11
     Re: ActionScript でボタンが表示できない Fumio 2006-6-3 16:32
       Re: ActionScript でボタンが表示できない u_routine 2006-6-3 20:07
         Re: ActionScript でボタンが表示できない Fla4man 2006-6-3 20:35
           Re: ActionScript でボタンが表示できない u_routine 2006-6-3 22:07
             Re: ActionScript でボタンが表示できない mayor 2006-6-3 22:39
             » Re: ActionScript でボタンが表示できない knagai 2006-6-4 12:03
                 Re: ActionScript でボタンが表示できない u_routine 2006-6-4 13:54
                   Re: ActionScript でボタンが表示できない knagai 2006-6-4 18:38
             Re: ActionScript でボタンが表示できない Fla4man 2006-6-4 10:33

投稿するにはまず登録を
 
Copyright (C) 2003 FLASH-japan. All rights reserved.
Powered by Xoops