You don't make any calls to get the text object itself.
Here's an example of something I was just making to pause and continue a video material.
''''''
dim playmode, res as xptextobject
dim scene as xpscene
dim fb as xpOutputFramebuffer
Engine.GetOutputFramebuffer (0, fb)
fb.GetSceneOnLayer(0, scene)
Scene.GetObjectByName("PLAYMODE", playmode)
Scene.GetObjectByName("RESUME", res)
playmode.text = “0”
Dim tmp As Integer
tmp = res.text
If tmp = “0” then
playmode.text = “1”
End if
If tmp = “1” then
playmode.text = “0”
End if
res.Text = playmode.Text
''''''''''
Does this make more sense, you need to get the text objects from somewhere, in this case, the scene in order to be able to check what they say or set what they say.
#XPression