"volumnTo" method in zigoengine

[ 2007-02-10 12:57:33 | Author: liuhuan ]
Font Size: Large | Medium | Small
Thank Andrew for this: http://www.mosessupposes.com/Fuse/forum/comments.php?DiscussionID=133

By driverjase:

Create a class named Sound2.as and add the following code:
Quote
class Sound2 extends Sound {    function Sound2 (target:Object) {    super(target);  }    public function get volume ():Number {    return this.getVolume();  }    public function set volume (v:Number):Void {    trace ("volume: " + v);    this.setVolume(v);  }}
All this does is extend the Sound object with volume getter/setters so that you can use it as a property with ZigoEngine.

Now in a flash movie add the following and make sure to change the "sound.mp3" to one of your sound files:
Quote
import com.mosesSupposes.fuse.*;import Sound2;ZigoEngine.register(PennerEasing);var snd:Sound2 = new Sound2(this);snd.loadSound("sound.mp3", true);snd.setVolume(0);ZigoEngine.doTween(snd, 'volume', 100, 5, 'easeOutBounce');
Comments Feed Comments Feed: http://www.liuhuan.com/blog/feed.asp?q=comment&id=707

There is no comment on this article.

You can't post comment on this article.