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.

AppGameKit Classic Chat / trying to scroll text like in WinAmp or Radio..

Author
Message
haliop
User Banned
Posted: 3rd May 2013 23:40
hi , im using this code for it



which is taken from the community library ...

the problem im having is when



the text scrolls not by one.. but some chars ..
so if i have
hello world
the second loop will be
ld hello wor
instead of
d hello worl

i dont really understand how this works.. could get some help here..
ty for your time.

haliop
User Banned
Posted: 3rd May 2013 23:41
so each time it jumps 2 chars sometimes 1 i cant really put my finger on it .. but its just odd...

Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 4th May 2013 01:47
Sorry I tried reading through this code for you for a couple minutes and I can't. I've been working all day and my brain has apparently quit, plus this code needs more readable variables and more whitespace. That's my grumpy eyes speaking.

Anyway first thing that pops out at me is that
//ch = df_BoxedInteger(ch,0-slen,slen)
Is commented out... Looks important.

What community library did you get this from? I can't find it in the Useful Community Functions project and the only thing I see in the CodeBase is for DBPro.

This should be pretty easy to do.



Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 4th May 2013 02:03 Edited at: 4th May 2013 02:35
Try this:



"You're all wrong. You're all idiots." ~Fluffy Rabbit
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 4th May 2013 02:47
Just because.... I made another demo that shows scrolling working based on mouse position.



"You're all wrong. You're all idiots." ~Fluffy Rabbit
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 4th May 2013 05:00
haliop, depending on how often you call the scroll function, it might just be a sync perceptual issue.

What is your FPS set to?

If it is something like 60 and you are calling the scroll every sync cycle, it just might be changing faster than you see it.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
haliop
User Banned
Posted: 4th May 2013 07:35
nope AL i always use an action Timer for these things.. it is now set for 600 Milliseconds so sync and fps is unimportant..

there is only one sync also inside the game loop.

Naphier that was exactly what i was after but couldn't really understand the right and left commands in the Help file. Ty that is much better then what i have and faster i think..

and by the way these functions are from Useful Community Functions project in the Undocumented functions file.

Phaelex i will try Naphier example first. thank you

thanks all ! really appreciate your help.

Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 4th May 2013 07:57
So that's why I couldn't find them. I had no idea there were undocumented functions in the UCF... There are some interesting entries there.

Cheers!

haliop
User Banned
Posted: 4th May 2013 10:06 Edited at: 4th May 2013 10:07


dosent work... hmm i wodner why

haliop
User Banned
Posted: 4th May 2013 12:29
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 4th May 2013 12:46
Phaelax, I like your version the most! Set text scissors I did not realize that command existed.. hmm.. thanks!

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
haliop
User Banned
Posted: 4th May 2013 12:56
btw that Phaelax scroll dosent help at all it just move the entire text around the screen...i need it to stay at the same position and take the last character move it to the first and loop it .. like a radio.. or the best Winamp GUI when running a song

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 4th May 2013 14:05
Quote: "btw that Phaelax scroll dosent help at all it just move the entire text around the screen."

Not for me, it scrolls the text per-pixel within the confines of the box. It'll scroll horizontal or vertical or both. If you set it to just scroll left, it doesn't look any different than winamp to me.

"You're all wrong. You're all idiots." ~Fluffy Rabbit
haliop
User Banned
Posted: 4th May 2013 16:40
Hmm havent tried it ... will do now. thank you .. i just tried to read the code .. and i thought that thats what it will do..
trying now. thank you and sorry i was wrong ..

haliop
User Banned
Posted: 4th May 2013 16:42
wow that is awesome man. good job thank you.
using it !

Login to post a reply

Server time is: 2024-05-03 20:26:55
Your offset time is: 2024-05-03 20:26:55