Thanks! I can tell right away that functions are going to save me a ton
of troubleshooting!
Do you know if they speed up player performance as well?
--dan
function1() {
function2();
}
function2() {
function3();
}
You could also use onEnterFrame to conditionally check for flags
indicating the progress of execution:
var f1Fired = false;
var f2Fired = false;
var f3Fired = false;
this.onEnterFrame = function() {
if (f1Fired) {
trace("f1Fired");
function2();
} else if (f2Fired) {
trace("f2Fired");
function3();
} else if (f3Fired) {
trace("f3Fired");
} else {
function1();
}
}
function1() {
f1Fired = true;
}
function2() {
f2Fired = true;
}
function3() {
f3Fired = true;
}
Or setInterval could be employed, but it sounds like you need
sequential executions of your functions, in which case setInterval is
inappropriate.
hth
Mike
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders