Guest User

Untitled

a guest
Mar 17th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. //Midterm Work in Progress
  2. // "You've Been Hacked"
  3. // March 7th, 2018
  4. //Amy Pinilla
  5.  
  6. PImage background; //background image
  7. PImage processing; //2nd image
  8.  
  9. float a= 1440; //width of background image
  10. float b= 900; // height of background image
  11.  
  12. int state;
  13.  
  14. void setup() {
  15. fullScreen();
  16. noStroke();
  17. background (0);
  18.  
  19. background = loadImage ("FINAL.png");
  20. processing = loadImage ("processing.png");
  21.  
  22. //First Image of Desktop
  23. image (background, width/width, height/height, a, b);
  24.  
  25. state = 0;
  26. }
  27.  
  28. void draw () {
  29.  
  30. if (state == 1) {
  31. image (processing, width/width, height/height, a, b);
  32. }
  33. }
  34.  
  35.  
  36. //Open Processing folder
  37. void mouseReleased () {
  38. if ((mouseX > 1336) && (mouseX < width) && (mouseY > 344) && (mouseY < 468)) {
  39. state = 1;
  40. }
  41. }
Add Comment
Please, Sign In to add comment