Jump to content


Sounds on timeline?

Recommended Posts



I'm working with the TimelineMax, and besides tweens, I'd like to add audio (Sounds class) on the timeline.

But when I pause or stop the timeline, the sounds continue playing.

I was wondering if TimeLineMax has any features that help me putting the sound on the timeline and manages the pause and gotoTime handling for me.

Maybe something with a sub-timeline?


var _soundChannel : SoundChannel;
var _instance:Sound; // A class instance with a dynamically instantiated Sound.

var props:Object = {
delay: 0,
overwrite: OverwriteManager.AUTO,
onStart: function() { _soundChannel = _instance.play(); },
onComplete: function() { _soundChannel.stop(); }
timeLine.insert(new TweenLite(instance, duration, props), startTime);




Link to comment
Share on other sites

Sounds are pretty tricky to integrate well into a virtual timeline that can have its timeScale changed and that can be stopped indirectly when any of its anscestor timelines are stopped. Long story. But couldn't you just manage stopping and starting your Sound in the functions where you stop() or play() the timeline?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.