doubleClicked()

Example

Syntax

def doubleClicked():
    # do stuff
Full Code Example
def setup():
  createCanvas(300,300)
  frameRate(10)

show = False

def draw():
  global show
  background(255, 79, 132)
  fill(255, 164, 28)
  stroke(44, 129, 237)
  strokeWeight(10)

  if show:
    circle(150, 150, 150)
  show = False

def doubleClicked():
  global show
  show = True

Description

This function is called every time a dblclick event (part of the DOM L3 specification) is detected. The dblclick event is fired when a mouse is clicked twice in a relatively short period of time.

Find these documents helpful? Let the people who made them help your child learn to code at Strivemath!

We'd love to hear your Feedback/Comments here.

Last updated