Search  

TEXTHEIGHT == 0 ????

HomeForumsFlash DiscussiontextHeight == 0 ????
43940 Jolt
9 posts

So i have a bit of a problem here…

I’ll start with the script first:

tb.visible=true;
tb.embedFonts = true;
tb.antiAliasType = 'advanced'
tb.width = loader.width - 100;
tb.height = 80;
tb.x = loader.x+50;
tb.y = loader.y+loader.height-90;
tb.selectable = false;
tb.multiline = true;
tb.wordWrap = true;
tb.border = true;
tb.defaultTextFormat = textFormat;
tb.alpha = 1;

My problem is that the text isn’t appearing, and when i use a trace(tb.textHeight) i get a ‘0’.

And I do add text to the field.

Please help me.Thanks.

Posted 2 months ago
57187 tpncorp
510 posts
Exclusive author Author was featured Referred at least one person Sold between 5 000 and 10 000 dollars Bought between 10 and 49 items

Hey Jolt,

Msg me through my profile, Ill help you.

Posted 2 months ago
36416 Emroni
240 posts
Exclusive author Sold between 100 and 1 000 dollars Bought between 1 and 9 items

Maybe its just because you mistyped here, but where is the ”;” in “tb.antiAliasType = ‘advanced’ ”? Maybe youve missed that, and then nothing would work

Posted 2 months ago
41382 Nythe
121 posts
Sold between 100 and 1 000 dollars

In your script, is “tb” a Text Field instance? If so, the height of the text field has to be declared:

textfield._height = 30

you wrote

textfield.height = 30

you need to add an underscore before height

Posted 2 months ago
36416 Emroni
240 posts
Exclusive author Sold between 100 and 1 000 dollars Bought between 1 and 9 items

Same thing for the x, y, width, visible and alpha

Posted 2 months ago
43940 Jolt
9 posts

is as3… so x,y,alpha and the others are without ”_”. i forget to say that the TextField is behind a mask. There are no script problems

Posted 2 months ago
28144 SaafiDesign
1425 posts
Exclusive author Item was featured Author was featured Referred at least one person Reviewer Sold between 50 000 and 100 000 dollars Bought between 1 and 9 items
is as3… so x,y,alpha and the others are without ”_”. i forget to say that the TextField is behind a mask. There are no script problems

if textfield is masked and it doesn’t display text then you haven’t embedded the fonts.

Posted 2 months ago
45179 lars019
128 posts
Exclusive author Referred at least one person Sold between 1 000 and 5 000 dollars

If you use: tb.embedFonts = true;
You have to be sure that you have embed that Font.
You do that by clicking with right mouse button in your library and click on New Font.
When created click right mouse on it and then linkage, export it for Actionscript and give it a class name.
Change the name of the font in textFormat to the class name, now it should work ;)

Posted 2 months ago
43940 Jolt
9 posts

thank you very much, it worked:):*

Posted 2 months ago