PlayMusic
From OxeyeWiki
(Difference between revisions)
(Created page with '{{AudioMethod | audio.playMusic(musicFilename) | Plays an audio file, globally, once. | {{MethodParam|musicFilename|A string|The name of the music file, relative to the source fo...') |
|||
Line 1: | Line 1: | ||
{{AudioMethod | {{AudioMethod | ||
| | | | ||
- | audio.playMusic(musicFilename) | + | audio.playMusic(musicFilename [, volume, [repeat]]) |
| | | | ||
Plays an audio file, globally, once. | Plays an audio file, globally, once. | ||
| | | | ||
{{MethodParam|musicFilename|A string|The name of the music file, relative to the source folder. The name is case sensitive on Mac OS X.}} | {{MethodParam|musicFilename|A string|The name of the music file, relative to the source folder. The name is case sensitive on Mac OS X.}} | ||
+ | {{MethodParam|volume|A number|Volume of the played music file, maximum is 1.}} | ||
+ | {{MethodParam|repeat|A boolean|true if the music should repeat.}} | ||
| | | | ||
Returns nothing. | Returns nothing. | ||
Line 13: | Line 15: | ||
audio.playMusic("intro.ogg") | audio.playMusic("intro.ogg") | ||
- | audio.playMusic("music/boss.ogg") | + | audio.playMusic("music/boss.ogg", 0.75, true) |
</pre> | </pre> |
Latest revision as of 13:46, 18 January 2010
audio.playMusic(musicFilename [, volume, [repeat]]) | ||
Plays an audio file, globally, once. | ||
Parameter | Expected Type | Description |
musicFilename | A string | The name of the music file, relative to the source folder. The name is case sensitive on Mac OS X. |
volume | A number | Volume of the played music file, maximum is 1. |
repeat | A boolean | true if the music should repeat. |
Returns | ||
Returns nothing. |
Daisymoon Audio Lib |
---|
Example
audio.playMusic("intro.ogg") audio.playMusic("music/boss.ogg", 0.75, true)