Accidentally I sent this reply to your address instead of the list, so
I send it again there:

JT> _root.attachMovie("butt_btn", "butt"+i, this.getNextHighestDepth());
JT> will not produce the result of having the buttons placed ontop of
JT> the labels where i want them.

This naming is correct (and it leads to the same result as your
original "butt" + [i], but without unnecessary array creations and
conversions), the main problem however is caused by this line (as I
wrote):

btn = ["butt"+[i]];

This doesn't refer to the button instance, so thus btn._y in the next
lines doesn't refer to the button's _y property. Probably you need
something like this:

btn = _root["butt" + i];

JT> You say that I only produce an array reference to the butt+i. But
JT> I use the same code to produce a number of textFields using the
JT> same code and I get the results I want,why is this not working
JT> with my buttons?

No, you did not the same, you wrote this line at the text fields:

myId = _root["mytext"+[i]];

Do you see the difference? Square brackets can be used to refer to a
property of a particular object by the property's name, if you put an
object reference before the square brackets (you did it with text
fields, but didn't with buttons). If you use square brackets alone,
then it is a shorthand for creating an array, e.g.:

var a1: Array = new Array(1, 2, 3, 4, 5);
var a2: Array = new Array();

is the same as

var a1: Array = [1, 2, 3, 4, 5];
var a2: Array = [];

  Attila

_______________________________________________
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