This probably isn't the best way but it came to mind.
I'm sure there's a better way to write this but I have my head deep in something else atm.
dim sd as xpSceneDirector
dim old as xpTextObject
scene.GetObjectByName("oldText", old)
if old.text > 11
if text < 11
scene.getscenedirectornyname("In", sd)
sd.play
end if
end if
if old.text < 11
if text > 11
scene.getscenedirectornyname("Out", sd)
sd.play
end if
end if
------------------------------
Simon Redmile
Senior Graphic Programmer & Designer
Ross Video
Bristol United Kingdom
------------------------------
Original Message:
Sent: 01-24-2023 09:18
From: Rajimon
Subject: Script for onSetText event to get previous value of text
Hi all. I got a basketball project I'm working on. I'm trying to make a shot clock animate above my score graphic, BUT only when the shot clock goes below 11. I also want it to animate out when shot clock is >= 11. Anyway, the issue I'm having is that EVERY TIME the text changes it animates in or out, but I only want it to animate in when the value changes from 11 or greater to 10 or less, and only animate out only when the value changes from 10 or less to 11 or greater. SO I think I need a way to find the previous value of the text before it changes with the onSetText event. Any thoughts? Thanks.
------------------------------
Roger Heyward
------------------------------