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

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support