Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
tangerine1
tangerine1's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Problem with unexpected token void
[2 Replies]
14-Dec-2011 05:24 AM
Forum:
Programming Questions
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;
}
}
«Prev
Next »
Moderate user : tangerine1
Forum