Violent_C
08.03.2006, 05:59
Пытаюсь создать динамическое текстовое поле в классе. Код класса следующий:
class Cards extends MovieClip{
public var color:String;
public var txt:String;
public var power:Number;
public var trump:Boolean;
function setup() {
trace(txt);
this.attachMovie(color + "mc", color + "mc" + power, this.getNextHighestDepth(), {_x:19, _y:32});
this.createTextField("value_txt", this.getNextHighestDepth(), -3, -3.8, 41.2, 55.3);
this.value_txt.text = txt;
}
}
Выдает ошибку:
**Error** G:\1\Flash\Cards.as: Line 12: There is no property with the name 'value_txt'.
this.value_txt.text = txt;
Подскажите пожалуйста в чем проблема?
class Cards extends MovieClip{
public var color:String;
public var txt:String;
public var power:Number;
public var trump:Boolean;
function setup() {
trace(txt);
this.attachMovie(color + "mc", color + "mc" + power, this.getNextHighestDepth(), {_x:19, _y:32});
this.createTextField("value_txt", this.getNextHighestDepth(), -3, -3.8, 41.2, 55.3);
this.value_txt.text = txt;
}
}
Выдает ошибку:
**Error** G:\1\Flash\Cards.as: Line 12: There is no property with the name 'value_txt'.
this.value_txt.text = txt;
Подскажите пожалуйста в чем проблема?