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 / cant load image black screen

Author
Message
TheCodeHasEyes
14
Years of Service
User Offline
Joined: 21st Oct 2010
Location:
Posted: 21st Oct 2010 18:49
ok, so i got a black screen every time i try to load a image.



yes the image is in my media folder,

all i want to know is how to paste a image to the screen and centre it.

any help would be great!
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 21st Oct 2010 20:44
you set sync to manual, but don't sync the screen after displaying image

CSL
15
Years of Service
User Offline
Joined: 22nd Mar 2009
Location: USA
Posted: 21st Oct 2010 22:23 Edited at: 21st Oct 2010 22:33
Add these two lines at the end of your code:

sync
wait key

So it looks like this:


sync on sets the screen sync to manual, so you need to indicate when to refresh the screen with a sync instruction.
Also, instead of wait key you could create a do-loop. In this case you have to stop the program with the Esc key.

[b]

CSL
TheCodeHasEyes
14
Years of Service
User Offline
Joined: 21st Oct 2010
Location:
Posted: 22nd Oct 2010 11:45
thanks. helped alot. i also didnt have my sprite in my project folder.

thank you.

Login to post a reply

Server time is: 2024-11-16 16:57:32
Your offset time is: 2024-11-16 16:57:32