Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scaled Text.... 1

Status
Not open for further replies.

brutteforcce

Technical User
Jun 23, 2006
105
RO
If I scalled a text how can I make it like it was, with the original size of the font that it has.
 
Well, I don't want it to be like it was , I want it to have a font size that is appropiated with the scalled text and I don't scale just text.
 
>> how can I make it like it was
> I don't want it to be like it was

Now you're confusing me.

Do you mean you want the font size to be changed from 24 to 12 if you scale the TextField down 50% like in Photoshop/Illustrator? Flash is not for static output like PS/AI therefore the font size and the scale are completely unrelated properties - quite rightly so.

Kenneth Kawamoto
 
Yes, that's what I wanted to say... How can I change the font size through Action Script?
 
How should I apply it? It isn't working like this:
this.createTextField("the_text",this.getNextHighestDepth(),0,0,100,100);
the_text.text = "This is the text";
the_text.TextFormat.size=40;
 
Try this:
Code:
var tfmt = new TextFormat();
tfmt.size = 40;
this.createTextField("the_text", this.getNextHighestDepth(), 0, 0, 100, 100);
the_text.text = "This is the text";
the_text.autoSize = true;
the_text.setTextFormat(tfmt);

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top