Posted: 16th Jul 2003 0:38
Hi,

I got this code off of another post from dark forge using the forum search found in general chat. SO my guess is that the post is long dead.
Here is my problem. I need to create a text change when the mouse goes over the text. Like this one:

` -------------------------------------------------------------------------
` Roll-over Text Change DarkForge FAQ 21/12/2000
` -------------------------------------------------------------------------
` Coded for a forum request in 10 mins one evening to show how to do a
` text roll-over without any sprite collision or complicated arrays.

sync rate 0
sync on
hide mouse

` Create a basic new mouse pointer (image 1)

ink rgb(0,255,0),0
line 8,0,8,16
line 0,8,16,8
get image 1,0,0,17,17

` Create a basic new roll-over mouse pointer (image 2)

cls 0
line 0,0,16,16
line 0,16,16,0
get image 2,0,0,16,16

` Set-up the font properties

set text font "Arial"
set text size 18

data$="This is our sample line of text!"

tx=200
ty=150
tw=text width(data$)
th=text height(data$)
rollover=1

do

cls rgb(0,0,50)

sprite 1,mousex(),mousey(),rollover

if mousex()>=tx and mousex()=ty and mousey()=xpos and mousex()=ypos and mousey()