Table of Contents

stopaudio()

Function Definition: stopaudio()

Parameters

Description

The function stops the execution of the audio running on Quarky.

Example

The example demonstrates how to run different actions with the Quarky touch sensor to make a disco party in Python Coding Environment.

Code

sprite = Sprite('Cassy Dance')
quarky = Quarky()

import time

sprite.switchcostume('cassy-a')
sprite.gotoxy(0, 0)

while True:
  if quarky.ispadtouched("T1"):
    quarky.playsound("QuarkyIntro")

  if quarky.ispadtouched("T2"):
    quarky.showpattern("party colors")

  if quarky.ispadtouched("T3"):
    time.sleep(0.2)
    sprite.nextcostume()

  if quarky.ispadtouched("T4"):
    quarky.stopaudio()

Output

Read More
All articles loaded
No more articles to load