The attached file uses a timeline to display a "mask" and then a "stimulus" (red square). This repeats 3 times when you click the 'play' button.
The durations of the mask and stimulus are defined in the script, however the stimulus duration is modifiable using the displayed Slider.
If you run the script and leave the values as default, clicking play causes the elements to display correctly, ie at the correct durations.
However, moving the slider up to say 2.0 seconds causes the animation to fail and elements are not displayed correctly.
Note that this problem goes away if you move the timeline declaration to within the action() function of the SwingButton.
The durations of the mask and stimulus are defined in the script, however the stimulus duration is modifiable using the displayed Slider.
If you run the script and leave the values as default, clicking play causes the elements to display correctly, ie at the correct durations.
However, moving the slider up to say 2.0 seconds causes the animation to fail and elements are not displayed correctly.
Note that this problem goes away if you move the timeline declaration to within the action() function of the SwingButton.
- relates to
-
JDK-8108185 Changing the value of a bound time variable of a KeyFrame causes autoReverse behavior to fail
- Closed