boton toggle as3


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. para.addEventListener(MouseEvent.CLICK, onClickHandler);
  2.  
  3. var marca:Boolean = true;
  4.  
  5. function onClickHandler(myEvent:MouseEvent)
  6. {
  7. //trace("I waited for Press AND Release!!!");
  8. if (marca)
  9. {
  10. stopAll(stage);
  11. marca = false;
  12. }
  13. else
  14. {
  15. playAll(stage);
  16. marca = true;
  17. }
  18. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.