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.

Author
Message
Bigfish
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location:
Posted: 19th Aug 2003 15:55
Hi All
Can again ask for help from all you kind people. The problem is to use the mousex() value to check if I am on the right image, but the xpos that I use to check against is only one point on the image so it does not work very well, can anyone help with this.

Wkr
Bigfish
A newbee who is getting there slowly
CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 19th Aug 2003 16:06
you can do it but you need to know the width and height of the image as dbp does not have a image width and heigh command. (althogh I did post a snippit for these features.) any way check out this.

if mousex() > imagex and mousex() < imagex + imagewidth
if mousey() > imagey and mousey() < imagey + imageheight
`do code here
endif
endif

CTP
k0shi
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location: Cyberspace
Posted: 19th Aug 2003 20:25
make it into a function, then you can reuse the same code, much easier i think.

Learn as if youll live forever
And give as if youll die tomorrow.

Login to post a reply

Server time is: 2024-11-10 17:47:56
Your offset time is: 2024-11-10 17:47:56