Week 3 Assignments

We had rollover assignments this week.

For the quad rollover, I experimented with using type and how to actually create the rollover. I introduced a new statement “&&” into my “if” statements. I’ll define one line of the draw.

if ((mouseX<width/2)&&(mouseY<height/2))

if mouseX is less than half the width AND mouseY is less than half the height then:

fill(#FF9500);
rect(0, 0, width/2, height/2);

Create a rectangle that is half the width and half the height. This particular code makes a rectangle in the upper left corner. I then added a circle that would appear randomly and a line that would appear randomly.

Quad Rollover from Gloria Harihar on Vimeo.

My keys follow the same kind of format but I tried putting animation into it for a few of them. I used if statements inside the if statements. It felt a little crude but I didn’t fully understand functions as yet.

Keys Rollover from Gloria Harihar on Vimeo.

Advertisements

Author: gharihar

Currently a student enrolled at Montclair State.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s