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 / Animation nor text loads

Author
Message
Fneep
19
Years of Service
User Offline
Joined: 3rd Sep 2005
Location: In my house
Posted: 10th Dec 2005 23:04
Howdy.

I have been having a little trouble with my coding.
It may be a bug, but I am pretty certain that it is not. I am using DBPRO.

Okay, when I use this code:


, the animation that I loaded previously dosent play. It skips the play animation and cls code and goes straight to the sleep 4000 code.

I have tried loading the animation using both:



and



and using a .swf instead of avi and I know for a fact that the filename is perfect because it does not come up with any sort of error. It just plays the buttons, you click, it waits for 4000 and dies.
I have also tried it without the sleep 4000 code but then it doesnt wait and just dies.

Could somebody please help?

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Dec 2005 02:31
Probably something to do with the fact that there's no Sync being used to update the screen.

And please get rid of those awful Goto's!

TDK_Man

Fneep
19
Years of Service
User Offline
Joined: 3rd Sep 2005
Location: In my house
Posted: 11th Dec 2005 20:16 Edited at: 11th Dec 2005 20:22
Wait, yes there is, at the start of my code, I have this:



Note that I did not show you the whole code, and in my loop it has:



See, right before the loop.

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Dec 2005 01:01
Yes, but in the code that you pasted, you used 'goto credits' to jump outside the loop. As a Goto never returns after a jump, and you have no other Sync, it would never update the screen.

Put the code for Credits in a procedure:



Don't forget that there's nothing stopping you trapping program control in a procedure with a Repeat...Until loop to stop it dropping back to the main loop before you are ready.

Also, with 2D and sprites, you might need two Syncs if nothing appears with one.

TDK_Man

Login to post a reply

Server time is: 2024-09-24 11:25:24
Your offset time is: 2024-09-24 11:25:24