How do you fade a Sound ogg file in or out?
JCFord
Member Posts: 785
I know you can fade background MUSIC file IN and OUT using the Interpolate Attribute
i.e.
RULE
Actor event Touch is pressed
INTERPOLATE
game.Audio.Volume to 0
Duration 1
Function Linear
But I want to be able to fade some of my Sound files (ogg) with a similar method, but cannot see a way of doing this as the built in game.Audio.Volume attribute only seems to effect MUSIC not Sound files?
Thanks
JCFord
i.e.
RULE
Actor event Touch is pressed
INTERPOLATE
game.Audio.Volume to 0
Duration 1
Function Linear
But I want to be able to fade some of my Sound files (ogg) with a similar method, but cannot see a way of doing this as the built in game.Audio.Volume attribute only seems to effect MUSIC not Sound files?
Thanks
JCFord
Comments
You can now control the volume using the attribute and use interpolate to fade it in or out
Worked a treat,
Thanks
JCFord
I want to make a sound fade in when you touch a button and fade out when you let go. (I still wanted it playing when the button isn't touched, but with the volume at zero)
here are some screenshots.
http://goo.gl/Y7Lw (this works, but doesn't fade out, it just cuts off.)
and these two don't work, but they should.
http://goo.gl/c7Fq
http://goo.gl/kloI
I've made a new integer attribute set to 0 called 1btnvolume, but any method I try to fade it out it doesn't work. (it just keeps playing at full volume).
I'm at my wits end. Anyone know how to make it work?
although is there anyway to fade our 'music' files and not 'sound' files?
... I ask b/c it automatically converts 'sounds' to .ogg and low quality mono... and I want to keep the sounds in stereo.
'Music' sounds files play in .mp4a stereo, (exactly what I want) but don't know how to get them to fade...
any ideas?