Forum Discussion
Changing state directly from JavaScript?
Hmm, can those images be used as buttons and also have a hover state?
First thing I tried was this:
The button starts out on normal. If the user answers correctly, it changes to the green and incorrectly to the red. I tried to manage hover states using the hover trigger and changing the state to either darkstate, darkgood, or darkbad. However, on moving the mouse off of the button, the button would sometimes completely disappear as if the forced "Restore previous state when the user hovers out" was getting confused.
My second implementation put each button on a separate layer with their respective triggers, but still had the same disappearing issues.
My third implementation split all of those into 3 separate buttons which I then hid or unhid, however the logic behind that using triggers causes things to be checked every time the timeline starts and since I have 10 of these buttons, that has been resulting in a slow down of the page load time but did fix the disappearing buttons.
- MathNotermans-95 years agoCommunity Member
Yes thats possible. I make a sample tomorrow ??