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 / Scrolling text

Author
Message
Tattered brush
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location:
Posted: 1st Apr 2009 18:49
Hi guys

I have a couple of quick questions.

Can anyone suggest a way to move text from the bottom to the top of the screen, like an end of movie screen?

Also, could you move the text up and when a line reaches the middle of the screen for example, have it dissappear?
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 1st Apr 2009 19:57
Something like this would scroll the text from the bottom of the screen (centered) to the middle:


Tattered brush
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location:
Posted: 2nd Apr 2009 13:14
Thanks for your help, it is greatly appreciated.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 2nd Apr 2009 13:23
No problems. Seems I made an error there though; it should be >=, not <=.

Tattered brush
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location:
Posted: 2nd Apr 2009 13:31
I couldn't get the code example to compile.

The line below gives an error stating the parameter type could not be determined:

yOffset = sh - text height("|") ` Just because that is a long character

Could you also provide some sample text so I can get a clearer idea of how this works, thanks.
Tattered brush
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location:
Posted: 2nd Apr 2009 14:38
My apologies, the error was on my behalf, copying and pasting the code into dark basic had issues with the comments.

Thanks again.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 2nd Apr 2009 14:47
Yeah, sorry, I didn't actually test that code.
This works though:


Tattered brush
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location:
Posted: 2nd Apr 2009 16:29
Great, thanks that's really helped alot.

Is it posible to have one line of text dissappear when it reaches the middle, then the next line etc. Sort of like when it reaches the top of the screen.

What I'm trying to achieve is probably better to explain with a picture. Please look at the attachement.

I want the text to appear in a door way and scroll upwards, once a line of text reaches the top door frame i want to make it dissappear and so on. Is this possible?

Forgive my crude drawing skills

Attachments

Login to view attachments
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 2nd Apr 2009 17:58 Edited at: 2nd Apr 2009 17:59
Of course.
I used an udt array for clarity here; hope you still get it (otherwise I'd suggest you to start reading up on that; it's quite simple and very useful):


Tattered brush
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location:
Posted: 2nd Apr 2009 18:22
Great example!

It's exactly what I was looking for, thanks.
Tattered brush
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location:
Posted: 6th Apr 2009 12:55
Hi again.

I was just playing around with the example and worked out how to make it loop continuously.


How could I make it so there was a time delay of 5 seconds for example, between the repeated loops?

Login to post a reply

Server time is: 2024-11-24 09:21:03
Your offset time is: 2024-11-24 09:21:03