We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
I'm a newbie in Processing :(
I want to load 2 images, and then change the opacity of both when moving the mouseX.
Exemple: when the mouse is in the left of the screen = image1 opacity 100% / image2 opacity 0% when the mouse is in the right of the screen = image1 opacity 0% / image2 opacity 100%
Thank you for your help
Answers
Tell us in which of these steps you're stuck:
255*mouseX/width
and the other withopacity 255*(1-mouseX/width)
?Yes I can display 2 images one on top of the other on the screen but I can't change the opacity when moving the mouse.
Sorry, I know I'm completely wrong, but I really don't know how to do that
Have 1 PImage 100% opacity version and another which is 100% transparent.
Swap which 1 is displayed based on mouseX.
How can I write it ? Any help ? :(
http://forum.processing.org/two/discussion/10291/issue-with-color-alpha
Ok I got something
It works just for one. Does anyone can correct my code ? :(
Ok I found it by myself