This content has been marked as final. Show 4 replies
use the attach code option to display code. otherwise, you risk your code being altered by the is forum.
your coding makes no sense even allowing for the forum's altering of your code.
the only step that makes sense is your creation of the array myArray (assuming that code is on the movieclip's timeline. is it?
after that you appear to be try and change myArray to a string (in a for-loop) which would destroy your array and ruin the for-loop while it's executing. after that it appears you're trying to destroy the string and create an object. and then you look like you want to use the array that's long gone.
what is it that you're trying to accomplish?
I have a series of buttons with instance names "button1", "button2", etc., inside a container MC with an instance name "container" sitting on the root level.
All my code is located on a frame at the root level.
I'd like to store my button instance names in an array, then make changes to all the buttons at once by using a "for" loop and appending the prefix "container." to the "button1", "button2", etc., instance names, so as to make it "container.button1", "container.button2", etc.
Ok maybe that was a little confusing.
Basically I want to join two strings and then use that to access a MC within a MC.
"button1" is located inside "container". I want to make a string "container.button1" and somehow use that to access the button1 MC.
Does that help?
if you create your array no latter than the frame in which your buttons exist you can just use their instance names: