The last example seems incorrect. The last argument for the Trigger function should be the name of the function to be called when the object is touched, not a reference to text.
Added 1 hour 30 minutes ago
Actually, all of this is in the manual.
Okay, write a couple more script examples.