i have a countdown timer on one of my frames and also two buttons on another frame . I want to change the timer based on the button clicked . For example : 1 min 3 min . I also have a navigation button which goes to the frame that the timer is placed.Any ideas?
The best way to propagate such event is by dispatching custom event when the button is clicked, while the frame that has the timer should be listening to that event.
To do so, you can extend the default "Event" class and create your custom event type that the timer frame should addEventListener to it and when the button is pressed, a dispatchEvent of the new event type should be called.
Or you can reuse any of the available events, for example when button1 is pressed, dispatch change event.
Hope this helps, goodluck.