Fade out Music in AS3
i new flash , more of noob when comes as3
i need fade out background music playing when 1 of existing buttons clicked. have event handler written need code fade music while other functions of button running.
in fact need fade overall sound of program. dont need point mp3 or anything.
is possible fade out sound of entire program?
you'll need create loop (timer, setinterval or enterframe) adjust volume property of sound's soundchannel's soundtransform property:
when execute play() method of sound, you're returned soundchannel instance. soundchannel instance has soundtransform property returns soundtransform , soundtransform instance has volume property can set in loop (and reassign soundchannel's soundtranform):
var s:sound= new sound(); // load sound var sc:soundchannel = s.play(); var transform:soundtransform = sc.soundtransform; transform.volume = whatever; sc.soundtransform = transform;
More discussions in Adobe Animate CC - General
adobe
Comments
Post a Comment