Hello All
So here’s my problem.
I’ve created an array from XML elements.
I have my index saved in the var i
mc.index = i;
Now the problem I’m facing is dynamically changing a section of code.
I had to hardcode like this for now.
mc.onPress=function(){
if (this.index==0){
point0.frame._visible=true;
}
if (this.index==1){
point1.frame._visible=true;
}
}
When what I’d like to achieve is
mc.onPress=function(){
point[this.index]._visible=true;
}
Any help on the syntax please!