Forum Discussion
How to use GSAP for animation in Storyline
Hi David,
It looks like you're missing some quotes:
gsap.to(theObject1,{scale:1.15,ease: "bounce.out"});I guess I also learned something about buttons.. it looks like the JavaScript only effects the normal button state and the rest of the states don't change... my next challenge :-)
- MathNotermans-93 years agoCommunity Member
Indeed when targeting an existing button only the normal state is affected. Mainly because Articulate renames the button on hover or click. So if you check the browser console, you will notice that and can act upon it. Or use just an image to create your own buttons.
- DavidHolzemer-73 years agoCommunity Member
I'm not sure what you mean? If you use an image and then have multiple states don't you have the same issue of Articulate giving the states different names?
or would you have to target each individual state in the JavaScript?
Like://Reference the object
var btnCare = document.querySelectorAll("[data-acc-text='btnNormalState']");
var btnCareOver = document.querySelectorAll("[data-acc-text='btnHoverState']");
//Animate in GSAP
gsap.to(btnCare,{scale:1.15,ease:"bounce.out"});
gsap.to(btnCareOver,{scale:1.15,ease:"bounce.out"});I have a feeling it's not quite as easy as this though.
- MathNotermans-93 years agoCommunity Member
Basically this is your workflow.
https://360.articulate.com/review/content/c2346778-f734-4519-925c-25de492c387a/review
Sharing the Storyline for ease.
Related Content
- 11 months ago