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 / function() question

Author
Message
x1b
20
Years of Service
User Offline
Joined: 19th Sep 2004
Location:
Posted: 7th Jan 2009 05:38 Edited at: 7th Jan 2009 05:42
heya! some of you old schoolers may remember me. i'm back to working on my Juxta Tempus, project. I've been away at Law School the past few years, and dug up my project this week. To my surprise, there was alot of code I had to change. One that has be boggled is an introduction scene that fades in my logo, ques music I had made, fades out, then loads my project. Well..it mostly works now.. it starts, a bit of a pause(where my logo would fade in), the music does que, and it fades..but you never see the logo fade in and out. the rest works as I rememberd it working.



idea's?
Oh hey, and is "Lost in Thought" still about? miss talking code with him. taught me a ton.

x1b

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Jan 2009 15:03
Well, you seem to be using gosubs where you need gotos, and those instead of using normal loops - both uses are wrong. Always use the correct type of loop.



You also had a 'gosub begin' in there - I don't know the rest of your code, but it would make more sense to me to put that gosub on the line following the function call rather than in the function.

x1b
20
Years of Service
User Offline
Joined: 19th Sep 2004
Location:
Posted: 7th Jan 2009 20:50
I do appreciate the reply, Ian, thank you.

I did try your code, which is indeed more efficient, much shorter than my function. It, however, had the same effect. the .jpg does not fade in, but music does que, then carries on to load my project.

I questioned my .jpg and tried several others, but all to the same effect(does not fade in)

This worked flawlessly when I was working on this about 2 years ago. I havent changed anything since then.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Jan 2009 21:51
Maybe because there's no syncing in there. I have to assume that you are not using SYNC ON, and are allow DBPro to sync whenever it likes.

If that's the case, then the difference may be due to some changes that Lee made to syncing and the music subsystem in release 6.7.

I'd suggest taking some time to learn to use SYNC ON and SYNC, so that you have total control over when the display is updated.

x1b
20
Years of Service
User Offline
Joined: 19th Sep 2004
Location:
Posted: 7th Jan 2009 22:07 Edited at: 7th Jan 2009 22:14
I, sir, am indeed using sync.



Just odd that it all worked last I compiled (albeit, 2 years ago) and so far in as much as i can tell, all the commands I used then, are still valid now.

I'm sure once this is figured out it will be something small and rediculous.

Edit: I stand corrected. you are indeed right. I added sync into that function, and all now runs as expected. guess things have changed from 2005/6. Thank you again for your time and effort, Ian.

DsarchyUK
16
Years of Service
User Offline
Joined: 21st Nov 2008
Location: UK
Posted: 8th Jan 2009 01:56
Instead of using SLEEP try using the Timer() with an IF argument to achieve the same effect.

So for example instead of:



try:



http://dsarchy.deviantart.com/

Login to post a reply

Server time is: 2024-11-25 12:26:06
Your offset time is: 2024-11-25 12:26:06