Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Is this the best way to fade music out? — Gideros Forum

Is this the best way to fade music out?

Tom2012Tom2012 Guru
edited October 2012 in General questions
local sound = Sound.new("Music/intro theme.mp3")
local channel1 = sound:play()
channel1:setVolume(.8)
 
local function fadeOut ()
	channel1:setVolume(channel1:getVolume() - .009)
end
 
local timer = Timer.new(10, 100);
timer:addEventListener(Event.TIMER, fadeOut);
timer:start();

Comments

Sign In or Register to comment.