Fellow Coders,
If I want to "scroll" some text right to left across a field - picture like a "...Live Broadcast..." message going across a screen - is this doable?
If so, please share how to code this or help point me in the right direction.
Thanks so much!
Animate text
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Animate text
Sure it's doable! 
LiveCode is super cool
I'm sure that could be better...
Simon

LiveCode is super cool
Code: Select all
on mouseUp
put "This is a scrolling newsbanner" into tText
put tText into fld 1
set the left of fld 1 to the right of this cd
set width of fld 1 to the formattedWidth of fld 1
goScroll
end mouseUp
on goScroll
set the left of fld 1 to (the left of fld 1 - 1)
if the right of fld 1 < the left of this cd then
set the left of fld 1 to the right of this cd
end if
send goScroll to me in 10 milliseconds
end goScroll
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Animate text
Here's a way to do it that moves the text but doesn't move the field. Put enough spaces before the actual text so that it's out of bounds when the scrolling first starts.
Code: Select all
on mouseUp
put " This is a scrolling newsbanner." into tText -- add spaces at front for wider fields
put tText into fld 1
goScroll
end mouseUp
on goScroll
put char 1 of fld 1 after fld 1
delete char 1 of fld 1
if the shiftkey is not down then
send goScroll to me in 50 milliseconds
end if
end goScroll
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com