Help with codes for dr java?? flashing colors?

~ <3 ~ hi!!

New member
hello..
we have a new project where we make a polygon change colors continuously
its blue then it flashes colours: it changes colors like blue to yellow to red etc..
the teacher did not teach us how to but said that we are supposed to find out how..
the only clues she said is that we use "if else" and "while( );"
i've been staring at that screen for hours trying to figure that out, but no results..
help???

Also, after that, how do we move it around while changing colors?

i know how to move an object using "while(i>0)" etc, and i++ or i--;
but the inside of the polygon doesnt move, just the surrounding lines..

so in general, here are what i ask:
1. how to make a polygon change colors continuously?(flashing colors)
2. how to make that polygon with flashing colors move around the frame?

explain?

thank you very much!!
 
Back
Top