Rollover Mouse effects
Sarah Reichelt
sarah.reichelt at gmail.com
Sun Jan 8 00:47:36 EST 2006
> Hello, I thank everyone very much. I wouldn't get by without your help. It
> always seems to be the simple things I have issues with. Now I'm trying to
> figure out how to make an image have mouse-over effects. I have 2 of each image;
> one for when the mouse enters it, and one for when it leaves it (Highlighted
> and un highlighted). I've tried putting both image frames on the card at
> once, while trying to make the appropriate one invisible with onMouseEnter.
> I've also tried importing from my hard drive and replacing the current image,
> but so far it hasn't worked like I planned.
>
> Maybe I'm going about this the wrong way. How can I get the rollover
> effects I'm looking for? I want the picture to change to another picture when the
> mouse pointer is moved within it, but change back to the original when the
> mouse pointer leaves from within it. I'm sure working with a gif file would be
> simpler, but I don't have a gif file creation program, so I need an alternate
> route.
>
Use a button instead of an image. Import the images to your stack but
make them invisible - I recommend either jpg, gif or png. Set the icon
and the armedIcon of the button to the IDs of the two different images
and it should happen automagically. Just make sure the autoArm of the
button is set to true.
Once you have it working, you can change the appearance of the button
so it doesn't look like a button, but just looks like the image and
nothing else.
HTH,
Sarah
More information about the use-livecode
mailing list