We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi! I have created a word from shapes using processing and i now want to reveal it with a "torch" when you move your cursor over the word and then reveal the whole image when the mouse is clicked. i have seen a couple of threads already but can't get them to fit as I'm wanting to put it on top of something i have already created rather than just inserting an image.
Thanks!
Answers
Hope this helps :)
thanks that makes a lot more sense! so if i have (pasted below) already how would that fit in? this is the image i have created that i want the torch to reveal :)
void setup(){ size(900,600); background(182,177,191); noStroke(); } void draw(){ fill(229,242,93); rect(100,150,50,150); fill(229,242,93); rect(100,150,150,50); fill(229,242,93); rect(150,250,100,50); fill(232,199,33); ellipse(330,230,150,150); fill(227,153,16); ellipse(490,230,150,150); fill(227,81,14); rect(590,150,50,150); fill(227,81,14); rect(590,250,150,50); }
Please, format your code ;)
/Users/katherinefernie/Desktop/Screen Shot 2016-01-15 at 14.58.41.png
is this any better? it won't format in the comments box so i just have to take a screen shot
![](/Users/katherinefernie/Desktop/Screen Shot 2016-01-15 at 14.58.41.png)
void setup(){ size(900,600); background(182,177,191); noStroke(); }
void draw(){ fill(229,242,93); rect(100,150,50,150); fill(229,242,93); rect(100,150,150,50); fill(229,242,93); rect(150,250,100,50); fill(232,199,33); ellipse(330,230,150,150); fill(227,153,16); ellipse(490,230,150,150); fill(227,81,14); rect(590,150,50,150); fill(227,81,14); rect(590,250,150,50); }
:)
https://forum.processing.org/two/discussion/8045/how-to-format-code-and-text#latest
Ok. You must grab your draw as image and use it instead of data.png.
This can be done changing the setup() function.
sorry i have only had one lesson on this and can draw shapes and make them move with my mouse so i really don't know very much. i understand what you're saying to do but i don't know how to do it.
i really appreciate your help :)
but we have been asked by our tutor to reveal a word we have made!
Copy all the code from my first post.
Substitute the setup() function with setup() function of my last post.
That's all.
p.s. but i think your tutor will be in doubt :-O
i will see it work and then probably take out the torch so its just click to reveal. i do really appreciate your help its more for me to see how it works and understand so if i need to do it in the future i can :-*