The on mouseUp handler in a behavior will work only if the user clicked
the sprite to which the behavior was attached.
So for example, if you have a behavior attached to an button (sprite) on
the stage then the mouseUp is logicaly a click on that button (sprite)
and nothing else.
Although, if you put the same behavior in a frame script, then it will
globaly monitor any click on the screen... 
Now.. Having said that, if you have any sprites on the stage with a
behavior that also contains a on mouseUp then if you click on the sprite
that mouseUp will have priority and neiter your movie script or frame
script will work.
A quick fix is to include a "pass" at the end of the on mouseUp handler
which will pass the mouseUp event to other script levels in the movie

Here is an example:

1. put something on the stage...button, image..anything
2. attach this behavior to it

 on mouseUp
  put "sprite"
 end

3. put in the frame script 

 on mouseUp
  put "frame"
 end

 on exitFrame
  go to the frame
 end


4. make a movie script and put 
  
 on mouseUp
  put "movie"
 end

Now start clicking and watch the message window

Example 2:

Do the same but include pass..like:

 on mouseUp
  put "sprite"
  pass
 end

The pass will pass the mouseUp event to other scripts 

Hope this helps

Pedja Guzvica



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Schulman
Sent: 20 May 2004 22:37
To: [EMAIL PROTECTED]
Subject: <lingo-l> movie vs behavior lingo


I am setting up movie in which just horizontal mouse locations are
recorded in 
lists.  In a movie script, I initialized some (global) lists in a
startMovie 
handler.  Then in a mouseUp handler I have this case statement that adds
the 
mouseH to one or the other of the lists.  

This works nicely if this handler is in the movie script.  If I put it
in a 
behavior script, even declaring the lists as global, it doesn't work.
What 
principle am I missing?

Paul Schulman
[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!]


[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