Jump to content
Search Community

TimelineMax.staggerFrom target current movieclip ?

eOne test
Moderator Tag

Go to solution Solved by Carl,

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

I exported objects from AnimateCC and doing some HTML5 canvas animation.

Basically all works as expected, but I have problem with getting movieclip being tweened by stagger method.

 

I tried some solutions I've found, but for index I get undefined, "{{this}}" or some other combination like that just didin't do for me.

 

 

How to I target currently tweened movieclip ?

var tlm = new TimelineMax()
	tml.staggerFrom( mcArray, 1, {alpha:0, onStart:function(){console.log(mcArray[index])}}, 1)

Error I get here is that "Can't find variable index"

 

Thank you guys!

Link to comment
Share on other sites

  • Solution

When you use the cycle property in a staggered tween you will have access to the index.

 

http://codepen.io/GreenSock/pen/wMMgoe?editors=0011 (see console)

 

Full explanation and video in the docs: http://greensock.com/docs/#/HTML5/GSAP/TimelineMax/staggerTo/

 

Should work just as well with Animate CC / Create JS movieclips as it does for DOM elements.

  • Like 2
Link to comment
Share on other sites

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