Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Help me to turn this code into a function.

Author
Message
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 16th Jul 2003 16:02
I thought i posted this question already but does not seem to be there.....?......still

Anyway's I have this simple roll over code taken from Dark Forge on another post:

` -------------------------------------------------------------------------
` 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.



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
circle 5,5,5
get image 2,0,0,16,16



data$="hello"

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()=tx and mousex()=ty and mousey()
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 16th Jul 2003 16:28
Dont think its complete.

RPGamer

Current Project: Eternal Destiny
Questions? Comments? Suggestions? Go to the Eternal Destiny Forum!
vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 16th Jul 2003 21:09
woops
what happened there?

Anyhow:



thats the code and I want to turn it into a function.
This is what I came up with that was not right and didn't work :




Think you could correct this?
Thanks for any help

vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 16th Jul 2003 21:10
after endif there is a "d".......delete that

vivi
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 18th Jul 2003 19:50
PLEASE HELP!!!

Harry
21
Years of Service
User Offline
Joined: 20th Feb 2003
Location:
Posted: 21st Jul 2003 21:43
Look at this then

I must go through the holy war.

Login to post a reply

Server time is: 2024-11-24 23:11:41
Your offset time is: 2024-11-24 23:11:41