Hi guys and girls,
I want to have a menu which has items disabled until a user logs in. At the momment I have a simple conditional that runs onEnterFrame to keep checking the variable loggedIn. I was looking in the Actionscript dictionary for some sort of listener function which I could set. Was hoping to create some sort of function that only checks loggedIn variable when its value changes so I dont have onEnterFrame continually looping…Any ideas?
if(mySubButton.type=="protected"){
mySubButton.onEnterFrame = function(){
if((user_so.data.loggedIn==undefined) || (user_so.data.loggedIn==false)){
new Color(this).setTransform({aa: '25'});
this.enabled=false;
}else{
new Color(this).setTransform({aa: '100'});
this.enabled=true;
}
}
trace("LOGIN REQUIRED");
}else{
trace("NORMAL");
}