Police importée et champ de texte créé en as3

Résolu
projer Messages postés 112 Date d'inscription lundi 6 avril 2009 Statut Membre Dernière intervention 17 janvier 2015 - 9 avril 2010 à 13:30
projer Messages postés 112 Date d'inscription lundi 6 avril 2009 Statut Membre Dernière intervention 17 janvier 2015 - 9 avril 2010 à 22:12
Bonjour,

tout est dans le titre :

j'ai créé des champs de texte dynamique en as3, j'ai intégré une typo dans ma bibliothèque et je n'arrive pas à l'appliquer à ces champs de texte...

j'ai appelé ma police importée "police"

for blablabla...{

tblTextes[i]=new TextField();
tblTextes[i].text="texte"+i;
tblTextes[i].autoSize=TextFieldAutoSize.LEFT;
formatTexte.font="police";
formatTexte.size=10;
formatTexte.color=0xFFFFFF;
tblTextes[i].setTextFormat(formatTexte);
sptTextes.addChild(tblTextes[i]);

}

1 réponse

projer Messages postés 112 Date d'inscription lundi 6 avril 2009 Statut Membre Dernière intervention 17 janvier 2015
9 avril 2010 à 22:12
J'ai enfin réussi à trouver après moultes recherches -_-'

On sait jamais, si certains ont le même pb :

Mettre la police dans la bibliothèque et la nommer police par exemple, l'exporter pour ActionScript

var maFont:Font=new police();
tblTextes[i].embedFonts = true;
formatTexte.font=maFont.fontName;


--------------------------------------------------------

http://www.projer.fr - dev web
http://www.lysdesign.fr - DA print / web - Illustratrice
3
Rejoignez-nous