I want to create an effect where a word in a field grows from textSize 5 to 100 (or something similar), so that it appears to start small and expand on the screen towards the viewer.
I’ve tried this, but it is not as smooth nor as fast as I would like it to be:
Code: Select all
local sCount
command prepareResize
put 5 into sCount
set the textSize of fld 1 to sCount
doResize
end prepareResize
command doResize
lock screen
add 1 to sCount
set the textSize of fld 1 to sCount
wait 0 milliseconds with messages ## Having this or not has no effect
if sCount < 100 then send doResize to me in 75 milliseconds
unlock screen
end doResize
So, is there a way to achieve a fast and smooth increase of the text? Am I on the wrong track? Should I turn the word into an image and increase the size of that instead?
I’ll be wanting to have this effect going on for several fields/words in parallel, e.g. names taken dynamically from a list, popping up all over the screen. So it has to be efficient enough not to cause lagging when used for multiple objects.
Any ideas?
/Andreas