/ Forside / Teknologi / Multimedie & design / Flash / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Flash
#NavnPoint
bentjuul 4251
molokyle 1978
Klaudi 1488
jhvp 1265
pallenoc 1160
katekismus 1020
Fnollerpi.. 790
slander 510
Dr.Disco 500
10  Flash77 500
problem with text in actionscript...
Fra : Peter Pippinger


Dato : 07-11-02 15:05

Hello NG, (sorry for posting in english

i have the following problem. When i create an empty movie clip i think its
x-y-position is centered. And when i create a text in this movie i think the
x-y-position is on the upper-left corner. Is there a way, to set both (text-
and movieclippositioning) to center or upper left. Ideally i would create a
textfiel in a new movie clip. This movie clip shoud have exactly the
position and size around the textfield...

Thanx a lot!
Peter

Here is the code i use to create the movie and text:

on(release){
_root.createEmptyMovieClip("objekt"+f,f);
_root["objekt"+f]._x = 150;
_root["objekt"+f]._y = 150;

_root["objekt"+f].createTextField("text"+f,1,0,-40,0,0);
_root["objekt"+f]["text"+f].border = false;
_root["objekt"+f]["text"+f].type = "input";
_root["objekt"+f]["text"+f].embedFonts = true;
_root["objekt"+f]["text"+f].autoSize = "center";

myformat = new TextFormat();
myformat.color = 0x000000;
myformat.bullet = false;
myformat.font = "Avenir 55";
myformat.size = 40;
myformat.underline = true;
_root["objekt"+f]["text"+f].text = "avenir55";
_root["objekt"+f]["text"+f].setTextFormat(myformat);

f++;
}




 
 
Søg
Reklame
Statistik
Spørgsmål : 177557
Tips : 31968
Nyheder : 719565
Indlæg : 6408878
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste