Jump to content
GreenSock

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

GSAP CSS Transforms in Adobe Animate?

Recommended Posts

Is there a way to use GSAP TweenMax for basic CSS transforms on a movie clip instance in Adobe Animate when you are publishing to Canvas?

 

For example:

 

this.p1thumb.addEventListener("click", myFunctionp1.bind(this));
function myFunctionp1() {
TweenMax.to(this.box, .25, {
boxShadow:"0px 0px 10px 10px rgb(0, 204, 0)"
});
}
 
It does not seem to work. I'm also interested in how you might change stroke widths, colors, etc. dynamically. Any ideas?
Link to post
Share on other sites

I am also having the same issue. The JS animations work brilliantly but the CSS properties get ignored completely even though I am using TweenMax which has the CSS plug in combined.

Link to post
Share on other sites

CSS properties do not exist at all on objects that Animate renders to <canvas>. Think of a <canvas> as a single bitmap like a jpg or png. Even though you may have 10 MovieClips on your Animate stage, when you view the output in a browser it is just a bunch of pixels mashed together into a single image. 

  • Like 2
Link to post
Share on other sites

That's unfortunate because this was possible in Adobe Edge Animate. I'm struggling to understand what the benefit is of using Adobe Animate CC at all at this point.

Link to post
Share on other sites

Just to check, so when GSAP is animating elements in Canvas (scale, rotation, x, y, alpha, etc.) it is identifying objects and causing Canvas to redraw them in different locations over time. However, it cannot change the colors, stroke width, etc of those elements? I guess then the only solution is to use Animate (Flash)-specific techniques for doing it.

 

Has anyone addressed this issue and found any solutions that work well?

Link to post
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.

×