>Hello all
>
>Why can't I initialise a timeout object in a new object handler? Here's
>my script (called from a startMovie handler):
>
>on new me
>   pSpeechList = [:]
>   pTimeOutSpeechList = []
>   pTimeOutMode = 0
>   interval =  timeOut("textTO").new(3000, #tPause ,me)
>   append the actorlist me
>   return me
>end
>
>this gives a script error: object expected.

on new me
   interval =  timeOut("textTO").new(3000, #tPause ,me)
   return me
end

Seems to work fine in a parent script called from the startMovie event.
Maybe the error lies elsewhere.

There seems to be a syntax error in the line:
>   append the actorlist me

Rather: "append the actorList, me" or "(the actorList).append(me)".

I have a vague recollection of a bug with 'append', that only 
occurred with old syntax, so maybe it's worth trying the dots.

Are you aware that timeOut-callBack-objects automatically receive 
'prepareFrame' and 'exitFrame' events? So for the most purposes you 
would not need to use the actorList for objects, that are already 
related to a timeOutObject. If you declare the prepareFrame method, 
the object will receive this event at the same rate it would receive 
stepFrame events. Even updateStage events trigger prepareFrame 
events, just as it triggers stepFrame events.

Jakob


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to