AdamB
YaBB Newbies
Offline
Posts: 23
Re: Pulse an ellipse?
Reply #2 - Jan 15th , 2008, 11:52pm
thats great, but where would i place that in my application? at the top every circe has its own interger and boolean int circleX, circleY; // Diameter of circle int circle1X, circle1Y; // Diameter of circle 1 int circle2X, circle2Y; boolean circleOver = false; boolean circle1Over = false; boolean circle2Over = false; void setup() { size(1200, 600); // Size of the window //myMovie = new Movie(this, "steamboat.mov"); // Loading the first movie into the sketch //myMovie.loop(); // So the movie can loop //myMovie1 = new Movie(this, "bob.MOV"); // Loading the second movie into the sketch //myMovie1.loop(); // So the movie can loop frameRate(30); // How fast the sketch will run, which will affect the speed of the videos smooth(); // Allowing the buttons to have smooth edges circleColor = color(255,0,0); // The color of the circle circleHighlight = color(204); // The color of the circle when highlighted circle1Color = color(255, 145, 0); // The color of the circle 1 circle1Highlight = color(204); // The color of the circle when highlighted 1 circle2Color = color(255, 255, 0); // The color of the circle 2 circle2Highlight = color(204); void draw() { background(0); // Sets the background update(mouseX, mouseY); if(circleOver) { // If the circle has the mouse over it, will fill with the highlight color, otherwise it will go back to the original color fill(circleHighlight); } else { fill(circleColor); } noStroke(); ellipse(circleX, circleY, circleSize, circleSize); if(circle1Over) { // If circle 1 has the mouse over it, will fill with the highlight color, otherwise it will go back to the original color fill(circle1Highlight); } else { fill(circle1Color); } noStroke(); // No black line around the button ellipse(circle1X, circle1Y, circle1Size, circle1Size);