Difference between revisions of "StopSound"
From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 15: | Line 15: | ||
− | Example 1: basic stop audio file method! (! | + | Example 1: basic stop audio file method! (!messy) |
<syntaxhighlight> | <syntaxhighlight> | ||
stopSound(getSoundId("sounds/example.ogg")) | stopSound(getSoundId("sounds/example.ogg")) |
Revision as of 18:57, 8 March 2013
Command History
Available since v3.8
Allows you to stop any playing sound files!
Syntax:
stopSound(id)
Example 1: basic stop audio file method! (!messy)
stopSound(getSoundId("sounds/example.ogg"))
Example 2: again using sound.id via a variable!
-- let's store the sound.id for example.ogg inside of a variable!
local soundID = getSoundId("sounds/example.ogg")
stopSound(soundID)
Arguments
id: integer (number)
The id for the currently playing audio file! ("sound.id")
Flags
none
Return
none
日本語 – 正體中文 – 한국어 – Dansk – Deutsch – English – Español – Français – Italiano – Nederlands – Polski – Português – Svenska – Русский |
Relevant Pages: getSoundId - getSoundProperty - setSoundProperty - stopSound - toggleSoundPause |