Kerry Thompson <[EMAIL PROTECTED]>
> I attached James Newton's rollover member change behavior from the D8
> library to some graphic sprites I was using as buttons.
> Rollover worked fine, but clicking on it changed it to a totally
> unrelated cast member. I went on a mouseUp hunt, and found where
> the previous coder was setting the sprite to member + 1.
Hi Kerry,
I've written a new "Mouse States" behavior specifically for dealing with
the rollover/mouseDown/cursor changes for buttons. The button's
*reaction* to a click should be provided by a separate behavior later on
the same sprite, such as:
on mouseUp
alert "Ouch, you clicked me!"
end
My behavior can also be used to activate/disactivate the button. If the
"Mouse States" behavior is disactivated, it won't pass any events to
subsequent behaviors. (This only works if "Mouse States" is the first
behavior on the sprite).
By separating the action from the state, you can concentrate first on
building the appropriate interactivity into your sprites, then add the
visual feedback later. Or vice versa.
You can find "Mouse States", along with a new set of "Back button"
behaviors in the movie at...
>> http://perso.planetb.fr/newton/History.dir
>> http://perso.planetb.fr/newton/GoMarker.dir
Please let me know if you have any problems with any of these.
Cheers,
James
PS:
> dragging and dropping is really cut and paste.
... except that ...
> Director is smart enough to keep cast references when you drag and
> drop.
If you cut and paste, these references may be broken.
[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!]