Difference between revisions of "Stop.sound"

From AGI Wiki
Jump to: navigation, search
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
stop.sound
+
The '''stop.sound''' command stops a sound resource that is playing.
  
Stops playback of current sound.
+
== Syntax ==
  
 
stop.sound();
 
stop.sound();
  
 
+
== Remarks ==
== See Also ==
+
  
* [[AGI Specifications: Chapter 4 - The LOGIC Language#stop.sound|AGI Specifications: Chapter 4 - The LOGIC Language stop.sound]]
+
If a [[Sound Resource (AGI)|sound]] is currently playing, this command will stop it, and set the done [[flag]] associated with the sound to TRUE. If no sound is currently playing, this command does nothing.
  
 
+
== Possible Errors ==
 +
 
 +
None.
 +
 
 +
== Example ==
 +
 
 +
<div class="CodeBlockHeader">Code:</div>
 +
<syntaxhighlight lang="agi">
 +
load.sound(20);
 +
sound(20, f199);
 +
...
 +
stop.sound();  [ f199 is now set to TRUE
 +
</syntaxhighlight>
 +
 
 +
== Technical Information ==
 +
 
 +
{| border="1" cellpadding="2"
 +
| style="background-color: #efefef" width="200" | '''Required Interpreter Version:'''
 +
| width="175" | Available in all AGI versions.
 +
|-
 +
| style="background-color: #efefef" | '''Byte-Code Value:'''
 +
| 100 (0x64 hex)
 +
|}
 +
 
 +
== See Also ==
  
[[Category:Sound Commands]]
+
[[Sound Commands]]<br />
 +
[[Category:Commands]]<br />

Latest revision as of 20:18, 23 April 2019

The stop.sound command stops a sound resource that is playing.

Syntax

stop.sound();

Remarks

If a sound is currently playing, this command will stop it, and set the done flag associated with the sound to TRUE. If no sound is currently playing, this command does nothing.

Possible Errors

None.

Example

Code:
load.sound(20);
sound(20, f199);
...
stop.sound();  [ f199 is now set to TRUE

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 100 (0x64 hex)

See Also

Sound Commands