3
AS3を使用する際に問題が発生しました - Flash CS3が私にこのエラーメッセージを表示します:エラー#1065:変数addChildが定義されていません。変数addChildが定義されていませんか?
何か問題がありますか?
これは私のコードです:
package coa.application{
import flash.display.SimpleButton;
import flash.text.TextField;
import flash.text.TextFieldType;
public class Tab extends SimpleButton {
public var menuType:String;
public function Tab(tabText:String, menuType:String) {
this.menuType=menuType;
var mytext:TextField=createTextField(0,0,200,20);
mytext.text=tabText;
}
private function createTextField(x:Number, y:Number, width:Number, height:Number):TextField {
var result:TextField = new TextField();
result.x=x;
result.y=y;
result.width=width;
result.height=height;
addChild(result);
return result;
}
}
}
ありがとうございます。 – AnthonyWJones