I’m not sure if this is the best way to accomplish this, but here is a forum example which uses custom states and custom events in order to create the flashing bulb effect.
I couldn’t use custom states only, because they seemed to cancel each other out and not make any changes visually. In this example, each custom event sets the custom state of the button (the custom state is called “Color”). In order to create the custom state “Color”, in the action part of the custom event workflow I selected: (Element Actions --> Set State --> Element: Button, Custom state: create a new custom state:
And set the value to “White”:
After the state is created, we need to tell Bubble what properties the button should have when its Color custom state’s value is “White”:
Here we’re just telling Bubble that when the Button’s custom state (Color) value is “White” --> change the button’s background color to white and the text to black. The other custom event changes the value from “White” to “Black”. We don’t need an additional conditional statement such as “When This Button’s Color is “Black”” (you could if you prefer it of course!) because the button has a black background and white text by default, so Bubble will automatically apply the default settings when the state is anything other than “White”. Then, make sure the transition time is at least 1500, and this should produce the flashing bulb effect.
I know custom states and events can be tricky when first using them - if any of this was confusing or if you need any help setting this up in your app please let me know.