mouseClicked

The aim of this task was to practice my programming skills and try something new. I had to write out lines of code to create a square that changed colour when the mouse is clicked.

To do this I had to first tell the program what colours I wanted it to use, then told it that it needed to actually make a square, then that it had to fill this square when the mouse was clicked but that when it was clicked it would use a random colour from the selection I gave it and then finally told it to actually make it happen or ‘draw it’.

10732377_868429196500548_883441403_o

10742700_868431736500294_758012378_o

Advertisements

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

%d bloggers like this: