Jump to content
Search Community

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Mikael Fager
Posted

Hello,

 

I have created an Animate project where I have used  TimelineMax and a few Animate timelines/tween. (the reason for Animate timeline is that I need to utilise mask).

From my TimelineMax I would like to call the Animate timelines/tween to start these, rather than have them all fired at once in the beginning.

As you will see in the attache code, the yellowBar2_mc is the movieclip that need to be called to start later in the timeline.

 

 

var tlheadline = new TimelineMax({});
tlheadline.to(this.inspire1_mc, .8, {delay:.1,alpha:1, ease:Sine.easeOut})
tlheadline.to(this.inspire1_mc, 4.5, {delay:-.9,x:"+=100",ease:Power2.easeOut})
tlheadline.to(this.yellowBar1_mc, 4.5, {delay:-4.5,x:"+=100", ease:Power2.easeOut})

tlheadline.to(this.inspire1_mc, .4, {delay:-2.3,alpha:0,ease:Sine.easeOut})
tlheadline.to(this.yellowBar1_mc, .4, {delay:-2.3,alpha:0,ease:Sine.easeOut})

 


tlheadline.to(this.engage_mc, .8, {delay:.1,alpha:1, ease:Sine.easeOut})
tlheadline.to(this.engage_mc, 4.5, {delay:-.9,x:"+=100",ease:Power2.easeOut})
tlheadline.to(this.yellowBar2_mc, 4.5, {delay:-4.5,x:"+=100", ease:Power2.easeOut})


tlheadline.to(this.engage_mc, .4, {delay:-2.3,alpha:0,ease:Sine.easeOut})
tlheadline.to(this.yellowBar2_mc, .4, {delay:-2.3,alpha:0,ease:Sine.easeOut})

 

 

Hopefully this is a simple solution.

 

Thanks in advance.

 

Animate.zip

Posted

 

 

 

You may try put an as3 function that works after 2,3 sec:

 

setTimeout(timedFunction,2300);

 

function timedFunction() { function here }

 

Then you may try putting a label inside the movieclip yellowBar2_mc on the first frame of your movie clip called "fr1":

 

setTimeout(timedFunction,2300);

 

function timedFunction() { yellowBar2_mc.gotoAndPlay("fr1"); }

 

 

 

You can start the movieclip animation with:

 

yellowBar2_mc.gotoAndPlay("fr1");

Posted

What alempo said, or you can still use your GSAP timeline to keep it modular but just use an onStart call with an anonymous function, something like this >

 

tlheadline.to(this.yellowBar2_mc, 4.5, {delay:-4.5,x:"+=100", ease:Power2.easeOut,
	onStart:
       function() {
       	this.yellowBar2_mc.gotoAndPlay("fr1");
       }
       })

 

  • Like 1

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.
×
×
  • Create New...