At 13:34 Uhr -0500 09.02.2005, Mendelsohn, Michael wrote:
Hi list...

I can't seem to pass parameters to a timeout object
(scriptexecutionstyle=10).  I'm trying to pass along a cast member name,
but timeouts just don't seem to take params.  Can it be done?

Regards,
- Michael M.

====================================================

All within a parent script:

on mWipe(me, theParam)
  theTimeout = timeout().new("theWipe", 33, #mWipeIncrement, me,
theParam)
end

on mWipeIncrement(me, that)
  put me -- <offspring "theTools" 4 244800>
  put that -- timeOut("theWipe")
  timeout("theWipe").forget()
end


you can't do that.
you can 'hijack' the slot, where the target goes, if your timeout shall address a moviescript, but if you use the target slot for the target script instance, then you simply can't.


but as you're already in an object you can store the data you want to pass directly in the object:

on mWipe me, theParam
  me.setaprop(#timeOutData, theParam)
  theTimeout = timeout().new("theWipe", 33, #mWipeIncrement, me)
end

on mWipeIncrement me, that
  put me -- <offspring "theTools" 4 244800>
  if ilk(that) = #timeout then that.forget()
  put me.getaprop(#timeOutData)
  me.setaprop(#timeOutData, 0)
end
--

  |||
a�ex
 --

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/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