Skip to content

Commit 94a9012

Browse files
authored
Merge pull request livecode#4511 from asayd/patch-19
[[Documentation]] Fixes to play.lcdoc
2 parents 8471e49 + 3ec4bb3 commit 94a9012

1 file changed

Lines changed: 31 additions & 23 deletions

File tree

docs/dictionary/command/play.lcdoc

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ Name: play
22

33
Type: command
44

5-
Syntax: play [<filePath> | <type>] [looping] [at <point>] [options <xOptions>]
5+
Syntax: play [<clipType>] {<filePath> | <clip>} [looping] [at <point>] [options <xOptions>]
66

7-
Syntax: play [stop | pause | resume | step {forward | back}] [<type>] <clip>
7+
Syntax: play {stop | pause | resume | step {forward | back}]} [<clipType>] [<clip>]
88

99
Summary:
1010
Plays a movie or sound.
@@ -27,18 +27,24 @@ play audioClip "Trust No One" looping
2727
Example:
2828
play "/usr/local/clips/music.aiff"
2929

30+
Example:
31+
# to stop the currently playing audio clip
32+
play stop
33+
3034
Parameters:
35+
clipType (enum):
36+
The type of clip to play.
37+
38+
- audioClip
39+
- videoClip
40+
3141
filePath:
3242
The location and name of the file you want to play. If you specify a
3343
name but not a location, LiveCode assumes the file is in the
3444
defaultFolder.
3545

36-
type (enum):
37-
The type of clip to play.
38-
39-
- "audioClip"
40-
- "videoClip"
41-
46+
clip:
47+
A reference to an audio clip or video clip in an open stack.
4248

4349
point:
4450
Specifies the center of the movie to be played, relative to the current
@@ -50,9 +56,6 @@ xOptions:
5056
Are command line parameters passed to the "xanim" package on Unix
5157
systems. (On Mac OS and Windows systems, this parameter has no effect.).
5258

53-
clip:
54-
A reference to an audio clip or video clip in an open stack.
55-
5659
The result:
5760
To pause a movie, use the play pause form. Continue playing with play
5861
resume. You can move one frame backward or forward with the play step
@@ -89,22 +92,27 @@ the <current card>. You cannot play two sounds at the same time, nor can
8992
you queue a sound while another sound is playing.
9093

9194
On Unix systems, the "xanim" program must be located in a directory in
92-
the PATH environment variable. You can set the PATH from within LiveCode
95+
the PATH <environment variable>. You can set the PATH from within LiveCode
9396
by using the put <command> :
9497

9598
put newPath into $PATH
9699

97-
98-
References: stop (command), prepare (command), import (command),
99-
start (command), beep (command), revStopAnimation (command),
100-
iphoneSetAudioCategory (command), function (control structure),
101-
QTVersion (function), result (function), MCISendString (function),
102-
Unix (glossary), current card (glossary), message (glossary),
103-
command (glossary), return (glossary), execute (glossary),
104-
playStarted (message), playStopped (message), looping (property),
105-
dontRefresh (property), playRate (property), showSelection (property),
106-
frameCount (property), playLoudness (property), callbacks (property),
107-
currentTime (property), playDestination (property)
100+
>*Note:* The type of audio and video clip formats supported by the
101+
<play> command is limited. See the entries for <audioClip> and <videoClip>
102+
for details. To play a wider variety of formats, use a <player> object.
103+
104+
References: audioClip (object), beep (command), callbacks (property),
105+
command (glossary), current card (glossary), currentTime (property),
106+
dontRefresh (property), environment variable (glossary),
107+
execute (glossary), frameCount (property), function (control structure),
108+
import (command), iphoneSetAudioCategory (command), looping (property),
109+
MCISendString (function), message (glossary),
110+
playDestination (property), player (object), playLoudness (property),
111+
playRate (property), playStarted (message), playStopped (message),
112+
prepare (command), QTVersion (function), result (function),
113+
return (glossary), revStopAnimation (command), showSelection (property),
114+
sound (function), start (command), stop (command), Unix (glossary),
115+
videoClip (object)
108116

109117
Tags: multimedia
110118

0 commit comments

Comments
 (0)