Change the stopwatch text to red when it reaches 30 seconds or a minute


#1

I found this great stopwatch created by a talented Axure user. I need help to Change the stopwatch text to red when it reaches 30 seconds or a minute. Can anyone help please?

runningClock_pause_leading0s.rp (60.6 KB)


#2

I thought of two approaches. See this file:
runningClock_v2.rp (85.5 KB)

On the “(red 1)” page I use a Text Field widget in place of the “stopWatchDisplay” rectangle widget to show the time. I created a Selected interaction style with a red font color. I then use its Text Changed event to control when to show red text by selecting itself when the timer is at a certain value. I used 5 seconds in my examples for easier testing, but you can change it to 30 or 60 or whatever.

On the “(red 2)” page I kept the “stopWatchDisplay” unchanged, and instead changed the interaction code for the clockRunner dynamic panel (dp). I added a conditional case that tests the value of the “v_timeSpan” global variable (that gets updated every second). If it is greater than 5 seconds, set the text value of “stopWatchDisplay” to rich text which lets you edit text formatting like the color.


#3

Wow! You made this look so simple. Thank you so much :smile: