Hello there , nice joinin the forum…I have a question for you dear folks!
I would like to pass the name of a movieclip to a string so my attachmovie method can work. what I m doin is :
[FONT=Courier New]function createBlocks(slot:MovieClip)
{
…
…
for (var i = 4; i < 10; i++)//lines
{
grid[j] = new Array();
for (var j = 0; j < 9; j++)//columns
{
var bName = “block_” + i + “_” + j;
holderClip.attachMovie(slot, bName, depth);
…
…
}[/FONT]
when I call the above function on a keyframe I call it like :
[FONT=Courier New]this.createBlocks(block4);[/FONT]
block4 is the id name of a movieclip in the library.
the problem is that the attachMovie method needs a string as a parameter!
how can I convert that to a string? so afterwards, [FONT=Courier New]slot[/FONT] , has inside the name “block4” (with the quotation marks)