Share Posted November 7, 2019 Hi All, My client has requested a simple rollover/hover state color change for a button in a HTML5 banner. I use Adobe Animate CC to load in SVG assets and then code GSAP animations in the actions panel. What's the best way to implement this? Thanks in advance for advice and/or examples about how to achieve this. Link to comment Share on other sites More sharing options...
Share Posted November 7, 2019 //Mouse interactions canvas.addEventListener("mouseover", over.bind(this)); function over() { this.cta.gotoAndPlay("expand"); } canvas.addEventListener("mouseout", out.bind(this)); function out() { this.cta.gotoAndPlay("contract"); } I used shape tweens for the color change. It is not abrupt. 2 Link to comment Share on other sites More sharing options...
Author Share Posted November 8, 2019 Thanks for posting this. So "expand" and "contract" are frame labels that will play a tween sequence in the main timeline. I have an imported SVG as my cta so will have to target the fill color of the rectangle. Do you have a Codepen example? Link to comment Share on other sites More sharing options...
Share Posted November 8, 2019 Reply. Yes. Just frame labels in a Movieclip. The CTA is a nested movieclip with a label called cta. I initially had buttons that grew a bit on rollover, but color tweens I think are more noticeable, so I started doing shape tweens from one color to the rollover color. It is Animate, so no Codepen. In this example both the button and the button copy change color on rollover, and then back on roll off. 1 Link to comment Share on other sites More sharing options...
Author Share Posted November 8, 2019 Thanks. most helpful. Much appreciated..? Link to comment Share on other sites More sharing options...
Share Posted November 8, 2019 I am a big fan of nested movieclips for moving things from one size banner to the next by only having to move one frame. I think we are up to versioning for 9 sizes now. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now