Posted By

bwl on 10/28/08


Tagged

textmate flash as3


Versions (?)

pageOff and On


 / Published in: Other
 

  1. //addEventListener(MouseEvent.CLICK, pageOff)
  2.  
  3. private function pageOff(e:MouseEvent):void {
  4. this.turnOff()
  5. removeEventListener(MouseEvent.CLICK, pageOff)
  6. addEventListener(MouseEvent.CLICK, pageOn)
  7. }
  8.  
  9. private function pageOn(e:MouseEvent):void {
  10. this.turnOn()
  11. removeEventListener(MouseEvent.CLICK, pageOn)
  12. addEventListener(MouseEvent.CLICK, pageOff)
  13. }
  14.  
  15. public function turnOff():void
  16. {
  17. this.alpha = 0
  18. }
  19.  
  20. public function turnOn():void
  21. {
  22. this.alpha = 1
  23. }
  24.  

Report this snippet  

You need to login to post a comment.