[23 Apr 2006] Text-scrolling

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
User avatar
Ferrule Media
Posts: 57
Joined: Sat Feb 13, 2010 7:53 pm
Location: Haugesund, Norway
Contact:

[23 Apr 2006] Text-scrolling

Post by Ferrule Media »

Note: This is an archived post that was originally sent to the Hollywood mailing list on 23 Apr 2006 00:37:02 +0100

Hello!

My name is Torgeir (fuskoSCN), and this is my first posting here, I guess there will be some more postings by me rather soon :)

Beeing a demoscene-graphician, i have never written a single line of code in my life - but i hope to get the hang of Hollywood, so that im able to make some nice presentations. (the goal is to make a infochannel to my dentist-company).

hehe.i would like to say thanks for all the help this mailinglist can provide, and sorry about the dumb questions i may have :)

My first question is about scrolling text :

I have written the following code -

Code: Select all

SetFontcolor(#white)
SetFont("abaddon.font",80)
SetFontStyle(#antialias)
CreateTextObject(1,"scrolltext")
MoveTextObject(1,#rightout,#bottom,#leftout,#bottom,1)
As you can see i would like to scroll text over the screen, but my problem is that it scrolls much too fast - even if i have used the lowest possible speed-number.

Is there a way to get the text to scroll more slowly ?

I have also noticed that the scrolling speed is changing.. it scrolls faster in the start and in the end (when part of the word "scrolltext" is outside the screen) . Is it possible to get a same speed all the way ?

Best regards

Torgeir - aka - FuskoSCN
Ferrule Media
Espevikvn 18
5521 Haugesund
Norway
www.ferrule-media.no
User avatar
airsoftsoftwair
Posts: 5914
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[23 Apr 2006] Re: Text-scrolling

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 23 Apr 2006 11:46:29 +0200
Hello!

My name is Torgeir (fuskoSCN), and this is my first posting here, I guess there will be some more postings by me rather soon :)

Beeing a demoscene-graphician, i have never written a single line of code in my life - but i hope to get the hang of Hollywood, so that im able to make some nice presentations. (the goal is to make a infochannel to my dentist-company).

hehe.i would like to say thanks for all the help this mailinglist can provide, and sorry about the dumb questions i may have :)

My first question is about scrolling text :

I have written the following code -

Code: Select all

SetFontcolor(#white)
SetFont("abaddon.font",80)
SetFontStyle(#antialias)
CreateTextObject(1,"scrolltext")
MoveTextObject(1,#rightout,#bottom,#leftout,#bottom,1)
, as you can see i would like to scroll text over the screen, but my problem is that it scrolls much too fast - even if i have used the lowest possible speed-number.

Is there a way to get the text to scroll more slowly ?
Yes. You have to scroll the text on your own. First, convert the text object to a sprite:

Code: Select all

CreateSprite(1, #TEXTOBJECT, 1)
And then scroll it using code like this:

Code: Select all

maxfps = 25        ; speed of the scroller
width = GetAttribute(#SPRITE, 1, #ATTRWIDTH)

StartTimer(1)

For x = 640 To -width Step -1
   DisplaySprite(1, x, #BOTTOM)
   WaitTimer(1, 1000 \ maxfps)
Next
You can adjust the speed of the scroller by modifying the "maxfps" variable. If the scroller is too slow even with high fps, try to increase the step variable to -2, -3, -4...
Locked