Forum Discussion

DannyReiter's avatar
DannyReiter
Community Member
7 years ago

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

  • Thank you, Steve! This is exactly what I was looking for. Now I am trying to tweak it so the next doesn't change to such a small size

     

  • BethZandstra's avatar
    BethZandstra
    Community Member

    I love that PowerPoint has this feature, but was frustrated that Storyline did not until I figured out an easy fix (assuming that the text only has one background color, and is not over an image or something else).

    I created the text I needed and have it in a white box. This text is 3 lines.

    Then, I created 3 rectangles of white that I placed over each of the 3 lines.

    All of this appears at the same time at the beginning of the timeline on the slide.

    Then, I created exit animations for each of the white rectangles. Wipe, From Left, 1.50 Seconds

    The first line exits first, then the second, then the third. You could easily do this for more lines.

    It looks very similar to what PowerPoint does for "by letter"

  • I too would love to add more text animation but I'm new to Javascript. I attended the recent excellent JS API seminar though. 
    I came across this site of JS animations which look greats, but when I copy the code and  exchange the object for my own (eg I replace all instances of 'ml1' in the example with my own 'TextBox1') it does not work. https://tobiasahlin.com/moving-letters/#1

    Any ideas how to fix this please? 
    The code in the examples is this:

    // Wrap every letter in a span
    var textWrapper = document.querySelector('.ml1 .letters');
    textWrapper.innerHTML = textWrapper.textContent.replace(/\S/g, "<span class='letter'>$&</span>");

    anime.timeline({loop: true})
      .add({
        targets: '.ml1 .letter',
        scale: [0.3,1],
        opacity: [0,1],
        translateZ: 0,
        easing: "easeOutExpo",
        duration: 600,
        delay: (el, i) => 70 * (i+1)
      }).add({
        targets: '.ml1 .line',
        scaleX: [0,1],
        opacity: [0.5,1],
        easing: "easeOutExpo",
        duration: 700,
        offset: '-=875',
        delay: (el, i, l) => 80 * (l - i)
      }).add({
        targets: '.ml1',
        opacity: 0,
        duration: 1000,
        easing: "easeOutExpo",
        delay: 1000
      });

     

    • Nathan_Hilliard's avatar
      Nathan_Hilliard
      Community Member

      Storyline has its own particular setup as to how it handles text characters on the page. Half of the battle is identifying, extracting, and restructuring the HTML so it will work correctly with any particular example, such as the one you located. The code you cited also looks like it uses anime.js, which is an animation library. To use it, you would have to load it separately. Storyline includes GSAP (another animation library), so you could adapt the code to use that instead.

      The rest of the battle is building the code to create the effect you're after. Below, I've included a link to a typing animation I made for Storyline. It includes some simple character animation using GSAP. Although the effect is not the same as your example, you could look at the included JavaScript to learn how Storyline structures its text boxes, and see an example of how you can isolate and animate individual characters. 

      Typing or Typewriter Animation for Storyline Textboxes | Articulate - Community

      You could certainly modify the code on your example site to work with a Storyline text box, but it would take some work, and a fair bit of trial and error.

      • DianeBullock-32's avatar
        DianeBullock-32
        Community Member

        Wow Nathan. I love your text type example and great idea with the sliders. Thanks so much. Thanks for the tips too. I have some learning to do! :)

  • I need to learn how to use GSAP then. I'll check out a Learning Dojo video to see if I can work it out.