Loading...
Logo
Processing Forum
tangerine1's Profile
1 Posts
1 Responses
0 Followers

Activity Trend

Last 30 days
Show:
Private Message
    We don't know why this isn't working, we have tried everything we can think of, from capital letters to semi-colons!
    Help would be much appreciated!.
     
    int tangX;
    int tangY;
    int tangsize = 100;
    PImage normaldog, happydog, tang;

    void setup() {
    size (650, 650);
    background (255);
    tangX = width/2;
    tangY = height/2;


    normaldog = loadImage ("shihtzu1.jpg");
    happydog = loadImage ("shihtzu2.jpg");
    tang = loadImage ("tang.jpg");
    noLoop();

    }

    void draw() {
    image(normaldog, 400,400, normaldog.width/2, normaldog.height/2);
    image (tang,10, 10);
    }

    void mouseClicked() {
    if(mouseX > 10 && mouseX < 200 &&
    mouseY > 10 && mouseY < 200){
    image(happydog, 400, 400, happydog.width/2, happydog.height/2);

    void mouseDragged () {
    if((mouseX > (tangX - tangsize/2))&&
    (mouseX < tangX + tangsize/2))&&
    (mouseY > (tangY - tangsize/2))&&
    (mouseY < (tangY + tangsize/2))){
    tangX = mouseX;
    tangY = mouseY;

    normaldog = happydog;

    }
     
    }