Advertisement
alestane

Untitled

Jan 16th, 2012
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local music = {}
  2. local musicChannel = {channel = 1}
  3. local musicLocation = "audio/"
  4. local musicType = ".wav"
  5.  
  6.  
  7. local volume = 1
  8.  
  9. function music:Play(song)
  10.     local file = audio.loadStream(musicLocation .. song .. musicType)
  11.     local play = audio.play(file, musicChannel)
  12.     audio.setVolume(volume, musicChannel)
  13. end
  14.  
  15. function music:Options(event)
  16. --  process Options event here
  17. end
  18. Runtime:addEventListener('Options', music)
  19. return music
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement