How to set criteria to Play/Pause buttons
how set conditional criteria play/pause buttons?
i.e. pause animation if animation playing; , to play animation again if animation paused. thanks.
on(release) {
play();
}
on(release) {
stop();
}
here's isstopped variable had in other posting handy if intention have 1 button both...
var isstopped:boolean = false; // assuming playing @ start
on(release){
if(isstopped){
isstopped = false;
play();
} else {
isstopped = true;
stop();
}
}
but if have separate buttons play , pause, showed sufficient when match 2 code bits correct buttons.
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment