FORUMS: list search recent posts

FAQ   •   VIEW ALL
 Blink word in sentence on Apr 5, 2013 at 10:52:52 pm

How could you make an individual word in a sentence blink? I'm thinking using the text word index?

 Re: Blink word in sentenceon Apr 6, 2013 at 12:19:01 am

One way:

Add an Opacity Animator and set the Opacity value to 0.
Add an Expression Selector and delete the Range Selector.
Set the Based On parameter to "Words"
Add an expression like this to Amount parameter:

``` wordIndexToBlink = 3; freq = 1; if (textIndex == wordIndexToBlink){ seg = Math.floor((time - inPoint)*freq*2); if (seg%2) 100 else 0 }else 0 ```

Dan

 Re: Blink word in sentenceon Apr 6, 2013 at 9:04:05 pm

Works like a charm! Thanks! I didn't even know text had a parameter for expressions like that.

Would it be possible to add a "blink x number of times, then stay solid" feature into that?

 Re: Blink word in sentenceon Apr 6, 2013 at 10:24:57 pm

Like this:

``` wordIndexToBlink = 3; numBlinks = 5; freq = 1; if (textIndex == wordIndexToBlink){ seg = Math.floor((time - inPoint)*freq*2); if (seg < numBlinks*2) if (seg%2) 100 else 0 else 0 }else 0 ```

Dan

 Re: Blink word in sentenceon Apr 6, 2013 at 11:00:41 pm

Ok, I'm impressed! So cool!

Just curious is it possible for wordIndexToBlink to contain more than one value?

Like:

wordIndexToBlink = 1,5 (words 1 and 5)
or
wordIndexToBlink = 2~4 (words 2 through 4)

 Re: Blink word in sentenceon Apr 6, 2013 at 11:40:10 pm

One way:

``` wordIndexToBlink = [2,3,4]; numBlinks = 5; freq = 1; blinkMe = false; for (i = 0; i < wordIndexToBlink.length; i++){ if (wordIndexToBlink[i] == textIndex){ blinkMe = true; break; } } if (blinkMe){ seg = Math.floor((time - inPoint)*freq*2); if (seg < numBlinks*2) if (seg%2) 100 else 0 else 0 }else 0 ```

Dan