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 / Image problem

Author
Message
rika
18
Years of Service
User Offline
Joined: 15th Jun 2006
Location:
Posted: 24th Aug 2006 17:36
Ok, I got this image and I want it to change to another image once the mouse is over it but I searched the image commands and I can't find nothing!

"It's better to rule in hell, than it is to serve in heaven."
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 24th Aug 2006 18:18
I would use sprites.

I haven't tested this code but it should work (If your change the path names to match those of real images)-


Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 24th Aug 2006 19:26
you could also use the mouse screen cords command......

if mousex()>(img pos x 1) and mousex()<(img pos x 1)+ image size x

and the same with the mouse y cords and image y pos.

these commands will tell dbp that the mouse is over the image ...

hope it helped
rika
18
Years of Service
User Offline
Joined: 15th Jun 2006
Location:
Posted: 25th Aug 2006 19:33
I think I'll se img pos line cause the sprite one deletes the background image I have...

"It's better to rule in hell, than it is to serve in heaven."

Login to post a reply

Server time is: 2024-11-26 11:38:37
Your offset time is: 2024-11-26 11:38:37