Forum Discussion

FatmaEkiolu's avatar
FatmaEkiolu
Community Member
10 months ago

backgroundColor feature from GSAP isn't working

Hello everyone.

This is probably a very simple issue but I can't make it work.

So I'm using Articulate Stroyline 360 (up to date). Although I'm not very good with Js, I've made it work several times before to get what I want using online resources and applying them to my projects. 

In this particular issue, I have a rectangular shape. What I want to do is chage its color when mouse hovers over it. You can see the code I'm using in the attached image. "box3" is obviously the alt text of the rectangle.

The strange thing is I tried many other codes like changing the x and y of the shape, scale, rotation etc. and they all worked but this one isn't working. Can anyone help me with this?

Thank you for your time.

  • You don't need to use Javascript to change the color when the mouse hovers over the rectangle. You just need to add a hover state to the shape. Here is how you can add states.

  • FatmaEkiolu's avatar
    FatmaEkiolu
    Community Member

    I know it can be done with hover state but that's not how I want it to work. Maybe I should've been more clear because I thought when I mentioned GSAP, people would who know GSAP would know what I'm talking about. Here is how it works when you use JS to change color.