Discussion:
pausing within slider expression
(too old to reply)
p***@adobeforums.com
2006-12-19 05:11:08 UTC
Permalink
Hi,

This is related to Terry's posting earlier regarding the 'word processor' function...

I am trying to have an expression determine if a return character exists in the current character being displayed.. If so, I would like it to stop outputting text for a moment, and allow the cursor to blink for a second, and then continue (hence Z).

This is what I have written so far, but I am having a problem with Slider.value, as depending on the length of sourceText, it could end up having 3 characters for every number... So i am just curious how I would solve this mathmatical issue...

var y;
var z;
if (z==null)
{z=0};
if (y!=null)
{z++; y;}
else
{
x=text.sourceText.charCodeAt(Slider.value);
if (x==13)
{y=Slider.value;}
else
{linear(value, key(1).value, (key(2).value)+z, key(1).value, (text.sourceText.length-2))+z;}
}

Thank you.
A***@adobeforums.com
2006-12-19 05:31:40 UTC
Permalink
The escape character for a carriage return is "\r".
p***@adobeforums.com
2006-12-19 06:09:18 UTC
Permalink
hmmm... that doesn't work either...
p***@adobeforums.com
2006-12-19 06:16:02 UTC
Permalink
If anyone would like to look at the actual ae project, it is here:

<http://www.collinatorstudios.com/www/titletest.zip>

Like I said, I am looking for a way that after the first line is displayed, that it pauses (with the cursor continuing to blink) for a second, and then the 2nd line is typed out...

thanks.

-patrick
A***@adobeforums.com
2006-12-19 15:46:21 UTC
Permalink
It looks like AE's text engine doesn't consider a carriage return a character, in the sense that a carriage return doesn't get an index like, say, a space does. That's likely why your code isn't working.
Loading...