I have done multiple searches on the forum using terms such as “relative, width, dynamic” etc. to no avail. So please forgive me if this is a basic, should-know quesiton.
I have a main nav with a horizontal roll over sub nav. I would like the _x of each button be based on the width of each buttons’ text label plus a couple extra pixels for space.
Following is a snippet of the code I’m using.
//this is borrowed from the XML drop-down menu tutorial
curr_item.label = curr_node.attributes.label;
// btn_label is a dynamic text field
curr_item.btn_label.autoSize = "left";
curr_item._width = curr_item.btn_label_width +5;
curr_item._y = y;
curr_item._x = x+i*curr_item._width;
For some reason a line such as: