You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicfunctiontweenVolume(id:String, volume:Number=0, tweenDuration:Number=2, callback:Function=null):EazeTween{
if (soundIsPlaying(id)) {
var citrusSound:CitrusSound = CitrusSound(soundsDic[id]);var tweenvolObject:Object= {volume:citrusSound.volume};var tweenvolTween:EazeTween =new EazeTween(tweenvolObject).to(tweenDuration, {volume:volume})
.onUpdate(function():void {
citrusSound.volume= tweenvolObject.volume;
}).onComplete(function():void
{
if (callback !=null)
if (callback.length ==0)
callback();else
callback(citrusSound);
});return tweenvolTween;
}
else
{
trace("the sound "+id+" is not playing");returnnull;
}
}
Perhaps you could return the tween, although, you would most likely have to keep a 'private var' reference to it, then may even have to manually cut the reference free when he wanted to also call stop sound? So maybe this idea is a little too complicated, I'm not sure, I guess he could also tween the volume manually using EazeTween, and not this function, and do what I said above o0..
The text was updated successfully, but these errors were encountered:
Perhaps you could return the tween, although, you would most likely have to keep a 'private var' reference to it, then may even have to manually cut the reference free when he wanted to also call stop sound? So maybe this idea is a little too complicated, I'm not sure, I guess he could also tween the volume manually using EazeTween, and not this function, and do what I said above o0..
The text was updated successfully, but these errors were encountered: