Drag the background!

Step 9. Mouse Interaction with Objects

When we click inside an object, that object changes color.

This is done by getting the global function mousePressed() to call a function clicked() inside every object. Each object then checks if the click was actually inside it.

World

Tutorial 7.4
Mouse Interaction with Objects
The background is a program, showing the JavaScript graphics used on this site.
The globes light up when you log in.
 
Font:

Users retain ownership of user content.

Platforms      Stats      The name

Contact      Terms and conditions      Partners