Advertisement
netgrind

Untitled

Jul 27th, 2013
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. package {
  2. import flash.display.*;
  3. import flash.events.*;
  4.  
  5. public class Main extends MovieClip{
  6.  
  7. public var safe:Boolean = false;
  8.  
  9. public function Main() {
  10. addEventListener(Event.ENTER_FRAME,onFrame);
  11. win.alpha = 0;
  12. }
  13.  
  14. public function onFrame(e:Event){
  15. if(start.hitTestPoint(mouseX,mouseY)){
  16. safe = true;
  17. }
  18. if(safe){
  19. if(end.hitTestPoint(mouseX,mouseY)){
  20. win.alpha = 1;
  21. }
  22. if(bad.hitTestPoint(mouseX,mouseY,true)){
  23. safe = false;
  24. }
  25. }
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement