Elena,

Option 2 is exactly the track I am currently taking!

I am having a hard time adjusting the width of the movie clip based on
the length of the text after setting it to auto size. Can you help?

Here is my code:

for (var i=0; i<node_xml.childNodes.length; i++) {
// movieclip for each menu item
curr_item = curr_menu.attachMovie("menuitem","item"+i+"_mc", i);
curr_item.name.autoSize = "left";
curr_item._width = curr_item.name.textWidth;
curr_item._x = x + i*curr_item._width;
curr_item._y = y;
curr_item.trackAsMenu = true;
// truncated

Thanks,
Aaron

P.S. Option #2 is:

<quote>You could set autosize = true for the dynamic text field, then retrieve
the length of the text field once populated with the text, the adjust the
width of the movie clip based on it.. all on the fly.</quote>

On 8/17/06, Elena Blanco <[EMAIL PROTECTED]> wrote:
A couple of ideas that pop in my mind

1. You can store the name in a temporary string and get the length of it
with string.length - then change the width of the movie clip accordingly
2. You could set autosize = true for the dynamic text field, then retrieve
the length of the text field once populated with the text, the adjust the
width of the movie clip based on it.. all on the fly.

Let me know if any helps!

ELENA BLANCO
Blancomedia
WEB APPLICATION ARCHITECT
920 HULL STREET
HOOD RIVER, OR 97031
p: 541.490.4993
e: [EMAIL PROTECTED]
w: http://www.blancomedia.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to