If I have created empty movie clips using duplicateMovieClip(), how do I reference the movie clip instances. For instance lets say I have dupliacted 10 clips, how would I get an action to be fired when the user clicks on one of these instances? I have tried :
_mcButt.onRollOver = function() {
l = this._name.lastIndexOf(“e”);
number = Number(this._name.substr(l+1, 2));
dosometing("_mcphone"+number);
};
[/AS]
this is solution I made
problem with creating mulitple buttons that last value of variable in for loops stays so you need to retake number of your button
I am doing that with getting Number from button instance name
lastIndexOf(“e”) returns last index of letter before numbers and in case of _mcphone that is e
if you have buttons instance names like MCxx xx is number than use lastindex of C
I sugest placing number at the end of instane names not in middle
I can respect your way of doing it, it’s actually a better way of doing it mrsteel. I just offered my way to him because it’s easier to understand when viewing it for the first time.
If i was for example to use “dupeclip” within that trace, it wouldn’t work.