Forum Discussion
Animated text
Is there an easy way to animate text that simulates the appearance of the text being typed in? I am new to Storyline. Just started using last week.
22 Replies
- SteveFlowersCommunity Member
Something like this might work for a single field. Setup a variable called textInput and another for textOutput. Then set your textInput to the text you want to type. After that's setup, use a %textOutput% on your stage and call the following in a Javascript trigger.
This won't work locally. You'll need to either turn on local script execution for your browser or run it from a server. I haven't tested this. It's sort of off the top of my head. This will type at a varied speed if it works. Some characters will come quickly at the top speed (in ms) others will be about 80% slower.
Could get complicated for multiple fields but should work pretty well for a single field. JS is pretty snazzy for stuff like this. *Edit to take out the top and bottom from the randomizer. Didn't have the desired effect.
var player=GetPlayer();
var i = 0;
var txt = player.GetVar("textInput");
var speed = 400;
//clear text output so it starts with nothing
player.SetVar("textOutput","");
function typeWrite() {
textOutput=player.GetVar("textOutput");
var speedMod=speed*Math.random();
if (i < txt.length) {
textOutput+= txt.charAt(i);
player.SetVar("textOutput",textOutput);
i++;
setTimeout(typeWrite, speedMod);
}
}
typeWrite(); - TracyButhe-6c17Community Member
Hi Danny,
I have done the reverse of what you are trying to do. I had the text already there then put white boxes over each letter. The nice part about that is then you only have to align it on the left, because if the right side is a little bigger it doesn't really matter. Then I just had them fade out, I had to play with that a little to get the timing right. Hope that makes sense. It isn't an elegant solution but it works in a pinch.
- DannyReiterCommunity Member
Thanks for that idea. I will try that since I also already have the words I want to use set up in bulleted format.
Hi Danny,
Perhaps you could conduct a screen recording of the typing occur, and add that as a small video on the slide? If you're using Storyline 360, you'd also have access to Peek 360 and Replay 360 - both of which would allow you to do easy screen recordings that can be exported for MP4.
- DannyReiterCommunity Member
Thanks Alyssa for that option. That is not exactly what I was looking for though. I was looking for the effect to look like I was typing each individual letter. I have been playing with creating individual text boxes for each letter and then setting the timing that each box is played. The effect of me typing is simulated and looks like someone is typing the word but the spacing between the letters is too hard to get consistent.
Welcome to the community, Danny! So glad you've joined us. 😊
Check out this sample slide I created for you. Is that the effect you're going for?
If so, you can use that same effect in your file by following these steps:
- Select the text box.
- On the Animations tab, select the Wipe Entrance animation.
- Click Effect Options, and select From Left.
- Click Effect Options again, and select By Paragraph at the bottom of the list.
- Finally, be sure each line of text is a new paragraph by pressing the Enter or Return key for each new line.
Let me know if that's what you had in mind!
Related Content
- 11 months ago