Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
marcusfriberg

Stop/pause a timeline and start another on hover

Recommended Posts

Hi,

 

I am looking for a way to create a banner that will work like this;

1. There is a image or button that is moving around in the banner and as soon as you hover over the image/button that movieclip/timeline will stop/pause on the current frame. The movement of the button will be looped until the hover is triggered.

2. Then I want another movie clip/timeline to start and keep playing until the end even if you still don't hover over that button.

 

 

Is this possible to do using timelinelite in an easy way or is that any other way that you recommend me to try accomplish this?

I am quite new to flash as2 programming so any type of help will be much appreciated!

 

TIA!

- Marcus

Link to comment
Share on other sites

Sure, you have independent control of timelines...

var timeline1 = new TimelineMax({repeat:-1});
var timeline2 = new TimelineMax();

timeline1.to(mc1, 1, {_x:100});
timeline2.to(mc2, 1, {_y:100});

btn1.onRollOver = function() {
    timeline1.pause();
}
btn2.onRollOut = function() {
    timeline1.play();
}
  • Like 1
Link to comment
Share on other sites

  • 7 years later...

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.
×