I had exactly the same thing with stopMovie being called twice when I used a
timeOut object.
There are probably advantages in being able to handle these system events
in the targeted behavior, but it does seem to be a problem that if you don't
define a handler the message gets passed on to normal movie handlers for
system events in addition to the normal message path for these events.
I dumped my code before I was told about this so I haven't confirmed.
If you add a startMovie handler to the BEHAVIOR does it stop the startMovie
movie handler being called twice ?
on startMovie me
put "startMovie in behavior "&&me
nothing
end
cheers
--
Richard Tribe
Director Programmer - Interactive dept.
> ----------
> From: Andreas Gaunitz
> Reply To: [EMAIL PROTECTED]
> Sent: Friday, March 23, 2001 14:30
> To: [EMAIL PROTECTED]
> Subject: <lingo-l> on startMovie happens twice!?! ...%/#%&#!
>
> Dear List... anybody got this before?
>
>
> I have 2 scripts in a movie, 1) a movie script containing only:
>
> ----
> on startMovie
> put "Kalle"
> end
> ----
>
> and 2) a behavior attached to a sprite:
>
> ----
> on beginSprite me
> timeout("animationPace").new(50, #animate, me)
> end
>
> on animate me
> timeout("showLwDelay").forget()
> put "benny"
> end
> ----
>
> If I run this movie and the sprite that's got the bhv attached starts
> on frame 1, on startMovie will happen twice. I get 2 "Kalle" and 1
> "Benny" in the message box.
>
> - It only happens with startMovie - not prepareMovie.
> - It only happens if I have a timeOut object in the sprite behavior
> - It only happens if the TO is placed in the 'beginSprite' handler of
> the behavior.
>
>
> -Andreas
>
> [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!]
>
>
This e-mail, and any attachment, is confidential. If you have received
it in error, please delete it from your system, do not use or disclose
the information in any way, and notify me immediately. The contents of
this message may contain personal views which are not the views of the
BBC, unless specifically stated.
[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!]