Tronik
08-05-2006, 04:55 AM
Hi there - I have a bunch of mc's on my stage, named 'm_page1', 'm_page2' etc. I want to write a function that will dynamically target one of these mc's by passing it an id number, for example:
id=1;
function playMc(id){
mc='m_page'+id;
mc.play();
}
I've got two questions -
1- What datatype should I make 'mc'?
2- In the line 'mc.play();' how do I get flash to recognize that 'mc' is a reference to a movieclip name, rather than being a movieclip itself?
I hope this makes sense, and thanks in advance for taking the time to look at this... :)
id=1;
function playMc(id){
mc='m_page'+id;
mc.play();
}
I've got two questions -
1- What datatype should I make 'mc'?
2- In the line 'mc.play();' how do I get flash to recognize that 'mc' is a reference to a movieclip name, rather than being a movieclip itself?
I hope this makes sense, and thanks in advance for taking the time to look at this... :)