Forum de discussion
Forum « Flash et Shockwave » (archives)
Re: Hauteur champ texte
Envoyé: 17 octobre 2004, 11h37 par blues
_root.createEmptyMovieClip("Txt", 1);
_root.Txt.Proto_Text(Paragraphe, 150, 5, "Arial", 12, 0x000000, "Left", false, "fEmbed");
if (_root.Txt.TxtField.maxscroll>1) {
_root.Txt.Hauteur = _root.PAGE.Txt.TxtField.maxscroll*17;
_root.Txt.Proto_Text(Paragraphe, 150, _root.PAGE.Txt.Hauteur, "Arial", 12, 0x000000, "Left", false, "fEmbed");
}
MovieClip.prototype.Proto_Text = function(Txt, Lg, Hg, Font, Size, TxtColor, Alignement, Bold, Embed) {
this.createTextField("TxtField", 0, 0, 0, Lg, Hg);
this.TxtField.multiline = true;
this.TxtField.html = true;
this.TxtField.border = ftrue;
this.TxtField.selectable = ftrue;
this.TxtField.wordWrap = true;
//
if (Embed == "Embed") {
this.TxtField.embedFonts = true;
} else {
this.TxtField.embedFonts = false;
}
this.TxtField.Format = new TextFormat();
this.TxtField.Format.color = TxtColor;
this.TxtField.Format.font = Font;
this.TxtField.Format.size = Size;
this.TxtField.Format.align = Alignement;
if (Bold == "true") {
this.TxtField.Format.bold = true;
} else {
this.TxtField.Format.bold = false;
}
this.TxtField.htmlText = Txt;
this.TxtField.setTextFormat(this.TxtField.Format);
};
Réponses
|