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.

Dark GDK / Why does the backdrop stop when...

Author
Message
Scope 51791
16
Years of Service
User Offline
Joined: 25th Jul 2008
Location:
Posted: 4th Aug 2008 09:10
Ok, I am working on a simple 2d game. For my menu, I put a backdrop of stars to scroll down. Here is the code for that:



Later on for my menu this is what I have:



My objective here is to test out the Exit Button by pressing it and closing the game. But, I want the user to know the mouse is over the button so I made a image for the mouse. As you can see in the code, when the mouse is over the exit, it hides the mouse, shows the the image and moves it according to the position of the mouse. When that image goes off the exit button, the sprite hides, the mouse is shown again and perfect. Except there is one problem. The backdrop freezes until the mouse goes over the exit button. Once the mouse is over the exit button, the backdrop starts scrolling down. Now, once I put the arrow over the exit button, the backdrop keeps on scrolling on scrolling, even if you take the mouse of the exit button and put it back on it. Is there a way I can fix this.

ALSO, I played around with the code and I realized that if i take dbHideSprite(9); away, the backdrop is normal button is messes up the arrow.

Does anyone know how to fix this?
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 4th Aug 2008 19:06
Are you running dbSync () in the right places. I don't see a loop in your code but I've had some internal loops that I've run that stop processing certain things until I included a dbSync () in order to tell all sprites to update.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office

Login to post a reply

Server time is: 2024-09-30 03:24:19
Your offset time is: 2024-09-30 03:24:19