Fun Programming

In this episode we learn how to read the current mouse position which is stored in the variables mouseX and mouseY. We also learn how to find out if the mouse button is clicked using the mousePressed variable. With this information we make a very simple drawing program.

Then we create a keyPressed() function to detect when the user presses a key on the keyboard. When the user presses a key, we call the save() function to save our drawing to an image file in our hard drive. You later can send the image by e-mail if you want.

# vimeo.com/69758546 Uploaded 901 Plays / / 0 Comments Watch in Couch Mode

Follow

Fun Programming

Abe Pazos Plus

Learn creative programming using Processing, SuperCollider and other Free Software. Meant for people of all ages who are curious about what programming is. We focus on creating interesting visual and sound effects. More playing than theory.

You can


+ More

Learn creative programming using Processing, SuperCollider and other Free Software. Meant for people of all ages who are curious about what programming is. We focus on creating interesting visual and sound effects. More playing than theory.

You can find more videos at funprogramming.org

Browse This Channel

Shout Box

  • Abe Pazos

    I'm wondering if this funprogramming Vimeo channel could replace the Facebook page and the Google+... This is easy to follow, it has RSS feed if you want to subscribe, and the best part is that I wouldn't have to log in into any social networks :)

    by Abe Pazos

  • Abe Pazos

    Hello channel :) I wonder how this message will look like and who will read it :)

    by Abe Pazos

Channels are a simple, beautiful way to showcase and watch videos. Browse more Channels. Channels