WoW:API PlaySoundFile: Difference between revisions
Jump to navigation
Jump to search
PlaySoundFile -Documentation by coder_1024 taken from Dhargo's post on the official forums-
No edit summary |
mNo edit summary |
||
Line 34: | Line 34: | ||
This has been successfully tested for playing sounds inside your AddOn's directory, so you don't have to worry about putting your sound files outside your AddOn directory. | This has been successfully tested for playing sounds inside your AddOn's directory, so you don't have to worry about putting your sound files outside your AddOn directory. | ||
(What if it can't find the file, is there some sort of error code?) | |||
---- | ---- | ||
{{Template:WoW API}} | {{Template:WoW API}} |
Revision as of 00:31, 13 April 2005
PlaySoundFile(SoundFile);
Play the specified sound file. The file will be played once.
- Arguments
- (SoundFile)
- SoundFile
- String - The path and name of the sound file you'd like to play. This has been successfully tested with .wav and .mp3 files. Note that the path is relative to the World of Warcraft installation directory.
- Example: Playing a sound file from within an AddOn's directory
PlaySoundFile("Interface\\AddOns\\MyAddOn\\mysound.wav");
or
PlaySoundFile("Interface\\AddOns\\MyAddOn\\mysound.mp3");
- Details
This has been successfully tested for playing sounds inside your AddOn's directory, so you don't have to worry about putting your sound files outside your AddOn directory.
(What if it can't find the file, is there some sort of error code?)