polol
07.01.2009, 18:25
не могу нащупать созданный мувик. и координаты tracить не получается. для функции какая-то своя специфика?
function addName (clipName:String, depth:Number, yPlace, xPlace, textFieldName:String, textContent:String) {
this.createEmptyMovieClip ("clipName" , depth)
this.clipName._y = yPlace;
this.clipName._x = xPlace;
this.clipName.createTextField("textFieldName", this.clipName.getNextHighestDepth(), 0, 0, 200, 100);
var mytext_format = new TextFormat();
mytext_format.font = 'Arial';
mytext_format.size = 18;
mytext_format.color = 0x000000;
this.clipName.textFieldName.embedFonts = true;
this.clipName.textFieldName.setNewTextFormat(mytext_format);
this.clipName.textFieldName.text = textContent
}
addName (numberBox01, 9, 10 , 100 , textInside1, "01")
addName (numberBox02, 8, 10 , 200 , textInside2, "02")
addName (numberBox03, 7, 10 , 300 , textInside3, "03")
addName (numberBox04, 6, 100 , 100 , textInside4, "04")
addName (numberBox05, 5, 100 , 200 , textInside5, "05")
addName (numberBox06, 4, 100, 300 , textInside6, "06")
addName (numberBox07, 3, 200 , 100 , textInside7, "07")
addName (numberBox08, 2, 200 , 200 , textInside8, "08")
addName (numberBox09, 1, 200 , 300 , textInside9, "09")
trace(this.numberBox01._x)
спасибо
function addName (clipName:String, depth:Number, yPlace, xPlace, textFieldName:String, textContent:String) {
this.createEmptyMovieClip ("clipName" , depth)
this.clipName._y = yPlace;
this.clipName._x = xPlace;
this.clipName.createTextField("textFieldName", this.clipName.getNextHighestDepth(), 0, 0, 200, 100);
var mytext_format = new TextFormat();
mytext_format.font = 'Arial';
mytext_format.size = 18;
mytext_format.color = 0x000000;
this.clipName.textFieldName.embedFonts = true;
this.clipName.textFieldName.setNewTextFormat(mytext_format);
this.clipName.textFieldName.text = textContent
}
addName (numberBox01, 9, 10 , 100 , textInside1, "01")
addName (numberBox02, 8, 10 , 200 , textInside2, "02")
addName (numberBox03, 7, 10 , 300 , textInside3, "03")
addName (numberBox04, 6, 100 , 100 , textInside4, "04")
addName (numberBox05, 5, 100 , 200 , textInside5, "05")
addName (numberBox06, 4, 100, 300 , textInside6, "06")
addName (numberBox07, 3, 200 , 100 , textInside7, "07")
addName (numberBox08, 2, 200 , 200 , textInside8, "08")
addName (numberBox09, 1, 200 , 300 , textInside9, "09")
trace(this.numberBox01._x)
спасибо