Page 1 of 1

Rollover text

Posted: Tue Mar 25, 2008 11:25 am
by ac11ca
Hi, this is probably an easy one ... can someone please tell me the coding to get rollover text? Specifically, I want it so that when a user moves their mouse over a button, some text comes up in a small box, much like it does when you roll the mouse over Windows Start button and you get "Click here to begin". Im sure it includes onMouseEnter/Exit, but Im not sure about the exact coding in the middle...

Thanks for any help,
Adrian.

Posted: Tue Mar 25, 2008 11:56 am
by Klaus
Hi ac11ca,

you are right this works with "mouseenter" etc...
You need a button and a field for the info text.
Put this into the script of the "rollover" button:

Code: Select all

on mouseenter
  ## Show into text...
  put "This is a button!" into fld "You info field here"
end mouseenter

on mouseleave
  ## Hide info text again...
  put empty into fld "You info field here"
end mouseleave
That's it, you get the picture :-)


Regards

Klaus

Try the tooltip...

Posted: Tue Mar 25, 2008 3:47 pm
by ChristopherBodell
You can also use the "tooltip" command...

Code: Select all

on mouseEnter
         set the toolTip of me to "Some Text"
         end mouseEnter
That code would be in the button....

Posted: Wed Mar 26, 2008 7:40 pm
by Klaus
Ah, yes, maybe that is what "acelevenca" means?!

And this is something that does not even require scripting, as long as the "tooltip" is just static text.

Posted: Sun Mar 30, 2008 9:59 am
by ac11ca
Excellent! Thank you both.

Adrian