Jump to content
GreenSock

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

Animate frames shapes in EaselJS with TweenLite

Recommended Posts

Hi there!

 

I have many shapes in EaselJS -not spritesheet, only shapes- (shape_1, shape_2, ..., shape_n) which are different frames of the same object and I want to animate them with TweenLite to display all the frames (1,2,3,4,...), like an animated movieclip in flash.

 

 

I have seen that with CreateJS TweenJS works this code:

this.timeline.addTween(createjs.Tween.get({}).to({state:[{t:this.shape0}]}).to({state:[{t:this.shape1}]},1).to({state:[{t:this.shape2}]},1).to({state:[{t:this.shape3}]},1).to({state:[{t:this.shape4}]},1).wait(1));

to display sequencially all the shapes...

 

Is there any equivalent in TweenLite?

 

Best Regards

 

Rosa

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,

 

Unfortunately I am not familiar enough with the EaselJS API to understand what that code does. I tried looking for some documentation on "state" but came up short. From the code you provided I do not know what state, t, or shape0 are. 

 

It would really help if you could provide a super simple CodePen demo that shows what that code does: http://greensock.com/forums/topic/9002-read-this-first-how-to-create-a-codepen-demo/

 

TweenLite can animate any numeric property of any JavaScript object so it naturally handles most easelJS properties without any special plugins or tricks. I just don't know enough about what you are doing to provide decent help.

 

if you just need to tween through frames of a MovieClip, you can probably tween a value of a generic object and then pass that value to gotoAndStop() using an onUpdate callback. Again, if you provide a very simple example it will be much easier for us to help.

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