as3 fading in fading out use tween

2012年3月20日 星期二 by Hu, Ching-Hsiang

import com.greensock.TweenLite; import com.greensock.plugins.*; import com.greensock.easing.*; TweenPlugin.activate([VolumePlugin]); var snd:Sound = new Sound(); var req:URLRequest = new URLRequest(“MySound.mp3″); snd.load(req); var trans:SoundTransform; trans = new SoundTransform(1, 0); var channel:SoundChannel = snd.play(0, 1, trans); TweenLite.to(channel, 4, {volume:0});

Filed under having  

0 意見: