set vars in dupMC
set vars in dupMC
- Started
- Last post
- 2 Responses
- heavyarms
I have a MC called 'photo' which has the duplicateMC code on it's timeline which duplicates another MC inside it called 'photos'. Inside each photo MC are buttons that perform a certain action. How do I, in the code to duplicate the mcs, set a variables inside of each of those MCs?
All I want to do with the variables is to set a photoID (1, 2, 3, etc) inside the photos MC so that the buttons inside can access the variable.
It should be easy. So maybe I'm making a mistake. Sorry I don't have the code with me.
- unfittoprint0
maxCount = 10;
for(i=0; i 'less than' maxCount; i++){
this.duplicateMovieClip("button...
this["button"+i].photoID = i;
}
- heavyarms0
Thanks a lot. You rock!