I was trying to get my sketch to be able to rotate with the pictures in a fixed rotation. I can get my background image and beziers to rotate by using the left and right arrow keys, but can't get the images to follow.
Any help is greatyly appreciated. The code probably won't run without all the pictures involved, but if you can tell just by viewing the code that would be great. I could also possibly post a zipped file with the images.
I feel like I am really close, but definetly stuck. I have the correspondence between mouse click and text appearing, but with current noLoop setting the text won't dissapear and image loses interactive element.
thanks for any help.
data:
//int randomNum=0;
PImage Orangeguy;
String greeting [] = {"Hi"," hey"," Hows it going"," Hello"," whatsup", "good morning"};
int greetingamount [] = {13, 16, 16, 7, 2, 1};
String ending [] = {"See You Later", "Thanks", "have a good night", "Bye", "Peace Out", "Adios"};
int endingamount [] = {12, 4, 8, 7, 3, 1};
//This math was used to determine how large to make the ellipses. The largest ellipse is one hundred,
//and the smaller ellipses all correspond, The math equation is the same for all ellipses and shows their size.
///Math(greetings): 13/16=.8125 so hi is 81.25% of hey, 7/16 = .4375, 2/16=.125
//Math(Ending): 12=100, 8=66, 7=58, 4=33, 3=25, 1=8
//here I am setting up the basic settings for the document
void setup(){
size(1200,690);
background(85, 211, 247);
smooth();
stroke(50,100,150);
strokeWeight(2);
//setting font
PFont SeanFont;
SeanFont = loadFont("ARCENA-48.vlw");
textFont(SeanFont);
//loading figure that was created in illustrator
Orangeguy = loadImage("Orange_figure2.png");
}
//for (int i = 0; i < greeting.length; i++) greeting[i];
void draw() {
//I am placing the figures on the background and
//placing the ellipses in a way I find visually appealing,
//the size of the ellipses is based on the math done before setup
//and represents the amount of times the word was spken
background(85, 211, 247);
image(Orangeguy, 200, 340);
image(Orangeguy, 800, 340);
//6 Ellipses for Greetings, from biggest to smallest, all programmed to appear when
//the mouse hovers over the related circle
fill(252, 252, 54);
ellipse(480, 80, 100, 100);
if(dist(mouseX,mouseY,480,80)<50){
fill(0, 96, 2);
text(greeting[0],465,90);
}
I have a program almost done, The only issue is that after the mouse is pressed, the text only flashes for a second or less. I would like to either have the text stay permanently or for at least 3 seconds.
I don't have much time left, and any help is greatly appreciated, thanks for your time
Sean
My data:
//I am bringing into the program my image of an orange figure, I am also
//listing the greetings, responses, and amounts.
//int randomNum=0;
PImage Orangeguy;
String greeting [] = {"Hi"," hey"," Hows it going"," Hello"," whatsup", "good morning"};
int greetingamount [] = {13, 16, 16, 7, 2, 1};
String ending [] = {"See You Later", "Thanks", "have a good night", "Bye", "Peace Out", "Adios"};
int endingamount [] = {12, 4, 8, 7, 3, 1};
int x [] = {1, 2};
//This math was used to determine how large to make the ellipses, the largest ellipse is one hundred.
///Math(greetings): 13/16=.8125 so hi is 81.25% of hey, 7/16 = .4375, 2/16=.125
//Math(Ending): 12=100, 8=66, 7=58, 4=33, 3=25, 1=8
//here I am setting up the basic settings for the document
void setup(){
size(1200,690);
background(85, 211, 247);
smooth();
stroke(50,100,150);
strokeWeight(2);
//setting font
PFont SeanFont;
SeanFont = loadFont("ARCENA-48.vlw");
textFont(SeanFont);
//loading figure that was created in illustrator
Orangeguy = loadImage("Orange_figure2.png");
//for (int i = 0; i < greeting.length; i++) greeting[i];
}
void draw() {
//I am placing the figures on the background and
//placing the ellipses in a way I find visually appealing,
//the size of the ellipses is based on the math done before setup
//and represents the amount of times the word was spken
background(85, 211, 247);
image(Orangeguy, 200, 340);
image(Orangeguy, 800, 340);
//6 Ellipses for Greetings, from biggest to smallest, all programmed to appear when
//the mouse hovers over the related circle.
fill(252, 252, 54);
ellipse(480, 80, 100, 100);
if(dist(mouseX,mouseY,480,80)<50){
fill(0, 96, 2);
text(greeting[0],465,90);
}
Hello, I would apprciate any hints or help that anyone can spare with this. I m still pretty new to processing but need to figure this out by tomorrow for a college digital art assignment.
I really need to have the text labeled as greetings in this program not visible until the mouse is hovered over it. Once the mouse is pressed over the greeting, the ending should appear.
I have watched many tutorials and read in forums about similar programs, I am just extremly stuck, any help or suggestions appreciated, thanks for your time.
Here is my code, it should run as is so you can see the concept at least, I took out my attempted mouse commands after no sucess:
//I am bringing into the program my image of an orange figure, I am also
//listing the greetings, responses, and amounts.
int randomNum=0;
PImage Orangeguy;
String greeting [] = {"Hi"," hey"," Hows it going"," Hello"," whatsup", "good morning"};
int greetingamount [] = {13, 16, 16, 7, 2, 1};
String ending [] = {"See You Later", "Thanks", "have a good night", "Bye", "Peace Out", "Adios"};
int endingamount [] = {12, 4, 8, 7, 3, 1};
//This math was used to determine how large to make the ellipses, the largest ellipse is one hundred.
///Math(greetings): 13/16=.8125 so hi is 81.25% of hey, 7/16 = .4375, 2/16=.125
//Math(Ending): 12=100, 8=66, 7=58, 4=33, 3=25, 1=8
//here I am setting up the basic settings for the document
//setting font
PFont SeanFont;
SeanFont = loadFont("ARCENA-48.vlw");
textFont(SeanFont);
//loading figure that was created in illustrator
Orangeguy = loadImage("Orange_figure2.png");
//for (int i = 0; i < greeting.length; i++) greeting[i];
}
void draw() {
//I am placing the figures on the background and
//placing the ellipses in a way I find visually appealing,
//the size of the ellipses is based on the math done before setup
//and represents the amount of times the word was spken
background(85, 211, 247);
image(Orangeguy, 200, 340);
image(Orangeguy, 800, 340);
//6 Ellipses for Greetings, starting from biggest
fill(252, 252, 54);
ellipse(480, 80, 100, 100);
fill( 242, 93, 105);
ellipse(360, 70, 100, 100);
fill(85, 247, 116);
ellipse(390, 170, 81, 81);
fill(52, 60, 247);
ellipse(360, 240, 44, 44);
fill(173, 57, 237);
ellipse(340, 280, 13, 13);
fill(247, 52, 214);
ellipse(330, 300, 7, 7);