Can text Crawl?

Is it possible to get text to crawl from left to right (or reverse) in a regular text field (or any other field for that matter)? (ie. At first you don`t see it, but then it crawls into view from the side and slowly moves to the other side and out of view.)

I cant seem to find anything in the documentation or on the web (so Im assuming that it normally can`t be done, but hoping that someone here may have a workaround.)

Thanks for your time.

There is no protocol or command which can do this automatically. You could use text manipulations, javascript-style web design tricks, adjust the position of the text field, or use a web view to do this, although I haven’t tested any and can’t attest to what the results will be in ASStudio. :smiley:

  1. Programatically dice up the string (i.e. → “characters 1 through -1 of theString”… “characters 2 through -1 of theString”… etc) and display each in the text view sequentially. This will give the effect of the text moving right to left in the text view. There’s a lot more to this, like padding the beginning of the string with enough spaces to make it start off screen, and working out a delay between displays to get the speed you want.

  2. Incrementally add spaces to the beginning of your string to get the text to move gradually rightward.

  3. Set up a text field or view, and then adjust it’s position. This might get tricky, because the best way would be to use a repeat loop (for the smoothest transition), but the repeat loop might stall your app while it executes. Using an idle handler might work, but the minimum 1 second idle time might be too long to get smooth transitions… and other app processes might stretch the idle time to more than your returned idle value.

  4. Set up a web view in your app and actually write embeded javascript code into the html page that would scroll a ticker through the web view. There are plenty of generic, publicly available javascript tickers on the web.

That’s about all the methods I can think of for doing this. I’ll leave it up to you to pick which one and figure out the details of implementing it.

j

I’d go for a WebView and some JavaScript, the kind of trick you want is quite common on web pages, so you should be able to find some JS to do this relatively easily. Then just put a HTML page in your resources, and load that into the WebView when you need it.

– Clive

Thank you very much for the advice. I`ll give give it a try and see what I can do.

P.S. This forum is indispensible for people who are interested in getting the most out of Script Studio. Thanks again for everyone who helps out with comments and suggestions.