TextFormat

TextFormat - Flash/ActionScript - Programmation

Marsh Posté le 18-01-2005 à 15:36:49    

j'ai un petit soucy avec TextFormat
 
j'ai fait ça :

Code :
  1. Fname = new TextFormat();
  2. Fname.font = "Arial";
  3. Fname.color = 0x000000;
  4. Fname.bullet = false;
  5. Fname.underline = false;
  6. function MyCreateTextfield(field,valeur,zindex,x,y)
  7. {
  8. _root.createTextField(field,zindex,x,y,65,20);
  9. _root[field].type = "Static";
  10. _root[field].multiline = true;
  11. _root[field].wordWrap = true;
  12. _root[field].border = false;
  13. _root[field].background = false;
  14. _root[field].setTextFormat(Fname);
  15. _root[field].text=valeur;
  16. _global.zindex++;
  17. }


 
puis sur mon bouton :
 

Code :
  1. on (release) {
  2. MyCreateTextfield(["txt_y"+_global.zindex],"Y :",_global.zindex,25,_global.yindex);
  3. }


 
 
.. le champ se cree bien comme il faut.. Mais les propriété de TextFormat n'ont pas l'air d'etre prises en compte... :(

Reply

Marsh Posté le 18-01-2005 à 15:36:49   

Reply

Marsh Posté le 18-01-2005 à 16:53:06    

inverse tes lignes  
_root[field].setTextFormat(Fname);  
_root[field].text=valeur;  
 

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed