how can I create a time pause in a script?
Posted: December 18th, 2006, 5:46 pm
Hi,
I have a few expressions in a project that allows text to be animated so that it is written out with a blinking "_" infront of it... I just modified this so that before text is written, the cursor blinks.. But during text the cursor is solid.. and after it finishes writing the text out, then it blinks again.
My question is, I need to add something in here that checks if the current character is 10 or 13 (carriage return), and if so, before displaying that character, pause for a moment in time and let the cursor blink...
so my text display slider expression is:
Type_on
and the underscore is set with alternating opacity with this:
Cursor Blink
So I am assuming in the Type_on expression, I need to evaluate each character and if its a return character, then I need to pause for a moment..
Any guidance would be greatly appreciated.
-patrick
I have a few expressions in a project that allows text to be animated so that it is written out with a blinking "_" infront of it... I just modified this so that before text is written, the cursor blinks.. But during text the cursor is solid.. and after it finishes writing the text out, then it blinks again.
My question is, I need to add something in here that checks if the current character is 10 or 13 (carriage return), and if so, before displaying that character, pause for a moment in time and let the cursor blink...
so my text display slider expression is:
Type_on
Code: Select all
linear(value, key(1).value, key(2).value, key(1).value, text.sourceText.length-2)
Cursor Blink
Code: Select all
if (effect("Type_on")(1)<text.sourceText.length-2 && effect("Type_on")(1)!=0) { 100 }
else { f = effect("Cursor_blink")(1);
Math.tan(time * f) *1000 };
Any guidance would be greatly appreciated.
-patrick