Saturday, June 6, 2009

Flash tricks - global vars, functions, timers

Creating global var-
_global.myvar

Creating a timer-
var starttime = getTimer();
var atime=0;

while (atime < _global.timestop+starttime){

atime = getTimer();

if (_global.conn_state == true){
break;
}
}

Creating a function-
function populateJoin(){

gamelist.data = _global.currentmsg.split(_global.SEP);
gamelist.labels = _global.currentmsg.split(_global.SEP);


}

No comments: