Posted By

mioestudio on 10/12/10


Tagged

as3


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

sexyflash
tspitzr


boton toggle as3


 / Published in: ActionScript 3
 

  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  

You need to login to post a comment.