At 9:03 +0100 10/06/04, James Newton wrote:
On Jun 9, 2004, at 4:07 AM, Roland Schroth wrote:
 It is important that I can have more than one movie script with
 preapareMovie and startMovie procedures.

Hi Roland,

If you *really* want to do this, use the following handlers in the first
movie script that is to have an "on prepareMovie()" handler:

Hi James, I'm still a little baffled that everyone seems to agree that 'pass' doesn't work for movieEvents.
I did a test in D10 Mac, and it showed that 'pass' does indeed pass 'startMovie/prepareMovie' events, with the caveat that the scripts need to be in different castLibs.
If your tests indicate otherwise we'd need to investigate that.


Apart from that, I looked at your - as always elegant- script, which does overcome the requirement of separate castlibs.
I have a small comment to your comments:


  if not voidP(thisScript) then
    -- If this handler received a parameter, then it the call can't
    -- have come from the Director Player itself.  Do not cascade
    -- calls to other scripts in this case.
    exit
  end if


Well, it depends on your understanding of "a call from the Director Player itself".
If you have a persistent timeoutObject with a callbackObject, that does not implement start/prepareMovie, then there will be a call to these handlers, with two parameters:
param1: ref to callbackObject.
param2: ref to timeoutObject.


Anyway, in the case of such a stampeding timeoutObject-originating start/prepareMovie event, you would probably want to exit anyway, so it's just an issue about your explanatory comments.

If you wanted to make the test really explicit, you could populate the third parameter like so:
call(anEvent, tScript, #dummy, #cascade)
And test for #cascade as the third parameter. Then you'd be pretty safe that the call is your own custom cascade-call.


Jakob
[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