Jump to content
Search Community

GSAP CSS Transforms in Adobe Animate?

TomW test
Moderator Tag

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

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