tf._width=tf.textWidth+4
tf._height=tf.textHeight+6

my apporach

MW


----- Original Message ----- From: "Corban Baxter" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, February 07, 2006 7:19 PM
Subject: [Flashcoders] dynamic text field width


Hey guys just a quick question about creating dynamic text fields.
I am working on a horizontal scrolling menu that uses xml to store url's and website titles that will be used to create a menu.
Below is example XML.

<websites>
<link title="Google" url=http://www.google.com />
<link title ="MSN" url=http://www.msn.com />
<link title ="Yahoo" url=http://www.yahoo.com />
etc....
</websites>

What I want to do is place the "title" in a dynamic text field and create a button around that text field. Problem is I need to determine the width of the text field by the length of the string so the buttons can vary in size.
Cause "google" is a lot longer than "MSN" etc..

|___|_title_|___| - Example button.. the blank area would be extend area for the hit state.

So is there a way to adjust the text field width to the length of the string?
I hope this makes enough sense to get the question answered.
If you need more help let me know and I will put together some kind of a test to show.
I have tried but not really getting the results I want. Thanks all!


Corban Baxter | rich media designer | www.funimation.com


_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to