So this is the code causing the problem I think:
Code:
stop ();
var count;
function showhide(){
if(p_m == "-"){
p_m = "+"
count = countvisible();
for(i=startnum + 1;i<=_root.level + 1;i++){
setProperty ( "/Viewer/main/el_" + i, _y, getProperty("/Viewer/main/el_" + i ,_y) - 20 * count);
who = eval("/Viewer/main/el_" + i + ":whohidme");
if(i<=endnum and ((who == "el_" + startnum) or (who == null))){
setProperty ( "_level0/main/el_" + i, _visible, false );
eval("/Viewer/main/el_" + i + ":whohidme") = "el_" + startnum;
}
}
}else{
p_m = "-"
for(i=startnum + 1;i<=_root.level + 1;i++){
setProperty ( "/Viewer/main/el_" + i, _y, getProperty("/Viewer/main/el_" + i ,_y) + 20 * count);
who = eval("/Viewer/main/el_" + i + ":whohidme");
if(i<=endnum and ((who == "el_" + startnum) or (who == null))){
setProperty ( "_level0/main/el_" + i, _visible, true);
eval("/Viewer/main/el_" + i + ":whohidme") = null;
}
}
}
}
function countvisible(){
var ad = 0;
for(i=startnum + 1;i<=endnum;i++){
if(getProperty("_level0/main/el_" + i,_visible)){
ad++;
}
}
return ad;
}
When I debug the count variable is coming back undefined. This I assume is related to the countvisible function. Basically none of the nodes (referenced by el_+i) are returning a false _visible and such they all are being displayed. I hope this isn't too abstract. Any help is greatly appreciated.