Forum Discussion

JohanBengtsson's avatar
JohanBengtsson
Community Member
7 years ago

Triggers "when state of ... is ..." not working as expected

Since accessing objects state is not possible from javascript I decided to do boolean variables reflecting the down state of a number of pictures (the internal hover and down states added manually to a picture object).

After a while I found a solution to this but it doesn't work as I expected it to do in all cases.

As you see in the screenshot I have four picture objects, what you don't see is that they have a hover and down state. You see the triggers I have inserted on each picture to set and clear the boolean variables displayed below each picture.

Picture 1 and 2 would probably not work as intended anyway since they check for state normal for clearing the variable and I have a hover state, but even that doesn't really seem to work as should be expected since leaving the picture doesn't clear it either.

Picture 4 works as expected, but not picture 3. The triggers are displayed the same in the trigger panel but are set up differently and I can't understand why nr 3 doesn't work as well as nr 4.

 

Attaching example file.