Jump to content
GreenSock

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

Using GSAP for animation exported with createjs toolkit

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

Essentially, I am trying to avoid the need of 2 tweening engines, within my application (TweenJS & Tweenlite)

Currently, when you export an animation with the createjs toolkit, it creates a js file that draws your shapes, then assembles the animation by creating an easeljs Movieclip.

 

This in effect uses TweenJS, here's an example of that:
 

        this.instance_38 = new lib.leg();
        this.instance_38.setTransform(48.2,106.7,1.035,1.109,39);

        this.timeline.addTween(cjs.Tween.get(this.instance_38).to({x:37.2},10).wait(1));

    }).prototype = p = new cjs.MovieClip();
    p.nominalBounds = new cjs.Rectangle(7.7,3.7,134,137.7);

I've searched long and hard for a solution, but have failed to find anything. What are my options?

Link to comment
Share on other sites

I totally understand why you'd want to do that, but I'm not aware of an easy solution that will replace all the TweenJS stuff with TweenLite. Luckily TweenJS isn't terribly big, so there's not a huge tradeoff in terms of file size, but you are sacrificing some speed and flexibility. Maybe if Adobe gets enough requests, they'll consider providing an export option for GSAP. ;)

  • Like 1
Link to comment
Share on other sites

I'm considering writing a MovieClip class that interfaces with GSAP, along with a grunt task that will auto convert the tweenjs animations to support gsap... I would love to get your input and approval, as I approach something plausible?

  • Like 1
Link to comment
Share on other sites

I think that'd be amazing. Just to confirm, you're talking about something that would basically allow you to export from Flash (which would of course be CreateJS-based) and then your grunt task would rip through that resulting code and strip out TweenJS stuff, replacing it with TweenLite? 

Link to comment
Share on other sites

Correct. Not to mention, the abundance of features that TimeLineLite would offer the "new MovieClip" right out of the gate.

I imagine there being some potential features pertaining to this, that TimelineLite/Max may or may not need to cater to. It would be great to bounce some of this off of you guys as I go through it, your approval and/or advice would be invaluable.

Link to comment
Share on other sites

Sure, feel free to hit us up with any questions. I suspect there are a good number of Flash/CreateJS users who would really appreciate a tool like this. 

Link to comment
Share on other sites

Awesome. I will try to keep you all in the loop!

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