> What's the best (simplest and most elegant) way of doing a graphical
> button roll over in Metacard?
> ...
> The best way I have found to achieve this sort of roll-over is to
> create a MC button object and then create the various state images
> (on top of each other) in layers below it. The button captures the
> mouse events and shows/hides the images.
I would say a better way is to set the icon of your button to the ID of the
appropriate image during the mouseMove message. This way you don't have to
position all the button images in the same location -- they can be offscreen
or even hidden.
Assuming you have images named "normalState", "overState" and "downState",
the following would be placed in the card script:
on mouseMove
if within(btn "myBtn",the mouseLoc) then
set the icon of btn "myBtn" to the id of image "overState"
if the mouse is down then
set the icon of btn "myBtn" to the id of image "downState"
# doSomeStuff
else set the icon of btn "myBtn" to the id of image "overState"
else set the icon of btn "myBtn" to the id of image "normalState"
end mouseMove
Regards,
Scott
__________________________________________________________________
Scott Rossi Tactile Media - Multimedia & Design
Creative Director Email: [EMAIL PROTECTED]
Web: www.tactilemedia.com
This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm