Hit a Brick Wall

Hi all, Im working on a flash menu that dynamically creates buttons. Its coming along quite nicely, until the boss said they wanted the buttons to horizontally align themselves depending on how many characters are in the buttons title. All the variables will be passed to flash from a .cfm, in the format &category=Home|Link|Stuff& etc, then in a big long for(i = 0, i<length of array, i++) statement I split the categories, subcategories, url, etc variables using an array.split("|"). In the cfm, there will be a string &widthvar=10|13|12|11|14|10&, or something like that, and Ive split it up, and so far each duplicate of the button is recieving the correct value, so button0’s widthvar = 10, button1’s =13 and so forth. the variable xstart is used to state the starting point x position of the original clip.

anyway this is the code im trying to use to set the x position of the duplicate buttons…its part of the for() section, straight after the statements that create the numbered duplicates, and set the widthvar for each one…

setProperty(“button”+i, _x, xstart+(i*((“button”+i+".widthvar")*10)+20));

so it picks the button, sets its x to the original position plus its number times its own widthvar times the width of a character plus a two character width buffer.
It doesnt work though, it just piles the buttons on top of each other, it seems to evaluate that statement as Nan.

Its a doozy!!!

Anyone? Any ideas how to fix it, or perhaps incorporate the buttons individual withvar variable to move it? thats the thing that really annoys me, when I dbug>list variables, it shows me a nice little list of
button0.widthvar = 10
button1.widthvar = 13
button2.widthvar = 12

and so forth, so why cant I utilise those lovely little widthvars?

GRAAARRGGGHHAHSHDHASSSDapplesauce