That's weird. It really won't work with screen coordinates and I haven't a clue why it won't set child.
Another alternative I use is to have an up and down button. It scrolls the text up or down as long as you hold down the button. I did this once, when there was no room for a scrolling button. You'd create two objects named "up" and "down" The script should go in the parent object of the buttons (which should be the base container object.)
The action is in three parts.
1. OnLButtonDownEx, depending on which button you clicked, it sets the variable 'scrDir' to up or down and starts the timer. There is also a redundancy If Then so that it doesn't scroll when the text isn't longer than the designated space.
2. OnTimer, depending on the 'scrDir' variable it moves the text object up or down, 2 pixels per cycle (you can adjust either the variable or the timer to make the scrolling go faster or slower)
3. OnLButtonUpEx, it kills the timer to stop the scrolling.
This might work for you. Script's below:
Dim scrDir
'Called when L-click on object or its children
Function Object_OnLButtonUpEx(obj, x, y, dragged)
If dragged Then Exit Function
Select Case obj.name
Case "down" , "up"
object.KillTimer 3
End Select
End Function
'Called when L-click is pressed
Function Object_OnLButtonDownEx(obj,x,y)
Select Case obj.name
Case "down"
If desktopX.Object("text").height > desktopx.Object("mask").height Then
scrDir = "down"
object.SetTimer 3,10
End If
Case "up"
If desktopX.Object("text").height > desktopx.Object("mask").height Then
scrDir = "up"
object.SetTimer 3,10
End If
End Select
End Function
Sub object_ontimer3
Select Case scrDir
Case "down"
If desktopX.Object("text").bottom > desktopX.Object("mask").height Then
desktopX.Object("text").top = desktopX.Object("text").top - 2
End If
Case "up"
If desktopX.Object("text").top < 0 Then
desktopX.Object("text").top = desktopX.Object("text").top + 2
End If
End Select
End Sub