hi, i am having a fla in which there are no of mcs some of nested in other movieclips. now i want to increase a variable “count” whenever user clicks an mc for the first time and the mc should not increase the “count” later. i wrote the code like
tmp = _root;
for(var i in tmp){
tmp = tmp*;
if(typeof(tmp)== “movieclip”){
tmp.active = true;
tmp.onPress = function(){
var nameofmc = this;
if(nameofmc.active){
nameofmc.active = false;
_global.count++;
}
}
}
else
tmp = _root;
}
now it works for that frame the problem is the code isn’t working for the nested mcs as the
nested mc is taking hitarea of _parent and one more problem is if a user presses F7 and
adds new mcs the code doesn’t assigning to the newly mcs so what could be done to every
mc whether it is nested or not should behave like i said above… is there any solution for
this problem. pls help me find out … thanx in advance … pandu