Start Using GSAP's ScrambleText with Motion.page for Extra Flair Today! šŸ”„

In this video, we will show you how to add awesome curves to your sections as you scroll down.

In todayā€™s video, Luke showcases how to create scramble text effects inspired by the game Hackmud using Bricks Builder and Motion.Page. The focus is on enhancing the visual appeal and interactivity of websites by implementing dynamic text animations. He guides viewers through each step, using Bricks Builder for the setup and Motion Page for the animations.

Steps

Setting Up the Page in Bricks Builder:

  • Create a New Page: Begin by setting up a new page with text elements and sections.
  • Import and Arrange Sections: Add and arrange various sections like titles and cards, preparing the layout for the animation.
  • Prepare Elements for Animation: Apply a specific class called ā€˜scrambleā€™ to the text elements destined for animation.

Configuring the Scramble Text Animation:

  • Set Up Animation Containers: Ensure the elements with the ā€˜scrambleā€™ class are properly positioned and ready for animation.
  • Create Animation Classes: Assign the ā€˜scrambleā€™ class to all text elements where the effect is desired.

Animating with Motion Page:

  • Create a New Timeline: Initiate a new timeline named ā€˜Scramble Text.ā€™
  • Configure Animation Trigger: Set triggers that activate the animation as the page scrolls, aligning the green and red lines to control when the effect starts.
  • Apply Scrambling Effects: Implement the scrambling effect using custom JavaScript, targeting text opacity and character settings to create the desired effect.

Enhancing the Animation:

  • Customize Character Display: Use various characters and symbols to create a unique scrambling effect.
  • Split Text and Apply Staggering: Split the text by characters and apply a staggered effect to enhance visual interest.
  • Adjust Animation Speed and Duration: Modify the speed and duration of the scrambling effect to match the design aesthetics.

Conclusion

Lukeā€™s tutorial provides a detailed and accessible guide for incorporating scramble text animations into web designs using Bricks Builder and Motion Page. By following the outlined steps, designers can add an interactive and visually appealing element to their websites. This tutorial not only enhances the aesthetic appeal of web pages but also engages visitors with its creative use of text animation.

Video transcript

Hello guys, welcome back to the channel. My name is Luke, and in todayā€™s video, Iā€™m going to be showing you a unique effect where weā€™re going to use something called scramble text. I was recently playing a game called Hackmud, which is kind of like a hacking simulator, and this inspired me to create the same effect for a website. Let me show you what Iā€™m talking about.

So, like I said, Hackmud is an online game hacking simulator. If you notice here, when you hit enter, the text comes up on the display with this scrambling effect where it comes in by blocks. Youā€™ll see a better example here. I thought that looked pretty cool and wondered if we could create something similar in Motion Page. Youā€™ll notice here Iā€™m going for a similar effect. This is just a homepage that Iā€™ve created using similar fonts and colors, but thereā€™s no animation applied just yet; itā€™s just a basic page as you can see.

What Iā€™m going to do is go into Bricks and add some classes to the text, and then with those classes, we can target them in Motion Page to add some effects. Before that, Iā€™ll just show you the setup in Bricks real quick. If I just go to Pages, all pages, and edit with Bricks here on the homepage, you can see nothing too special. We just have some text here, a title, and three cards with some text inside, and thatā€™s pretty much it.

What Iā€™m going to do is create a class called ā€˜scrambleā€™ and apply it to the text where I want the scrambling effect to take place. Letā€™s do it on this one, ā€˜scramble.ā€™ Weā€™ll also add it to this one here, this big chunk here, my main title here, and these elements as well. Iā€™m just going to copy the styles here and paste, and then do the same for the text chunk here.

Alright, so Iā€™ve added the class ā€˜scrambleā€™ to every element where I want the effect to take place, and Iā€™m just going to save this over here. Now weā€™ll work our magic once again in Motion Page. Iā€™ve just opened Motion Page, and Iā€™m going to create a new timeline for this, calling it ā€˜scramble text.ā€™ If I want this animation to take place on every single page, Iā€™m going to make sure to check this one. For this example, I want this to happen on scroll trigger.

Now, I want the animation to take place instantly as soon as it hits the green line. Iā€™m going to bring these two lines together and put them both at 45%, just above halfway of my display. Next, I want to change this to be ā€˜top,ā€™ and then I want to trigger each iteration individually because each element here has the same class. If one of those classes hits the line, then theyā€™re all going to take place, which we donā€™t want. So just make sure this one is toggled on.

For the animation, Iā€™m going to target the class ā€˜scramble.ā€™ When I highlight this, you can see the first instance of the class is highlighted, which is good, and now we can add our animation. The first thing I want to control is the opacity. I want all of the text to start out with an opacity of zero. As I scroll down, you can see each iteration is individual of one another until it hits the line, which is perfect.

Next, Iā€™m going to the custom box here, and Iā€™m going to click on this button to add some Gap. This is where weā€™re going to use scramble text. In this box, we want to type ā€˜scrambleTextā€™ with an uppercase ā€˜T,ā€™ colon, and then curly braces. We can add some properties here. The first one is going to be the characters that we want to use, ā€˜charsā€™ like this, with speech marks, separated by a comma. We can also have a reveal delay; here Iā€™m using 0.2. We can have a speed; Iā€™m using 0.1 here. And we also have a duration; Iā€™m using 0.2 for this.

For the characters, we can actually use anything. If I type, for example, ā€˜09ā€™ many times, when I scroll down and refresh the builder, you can see the text starts out at ā€˜0909ā€™ like so. Iā€™ve noticed we can also use characters. I went online to find these charactersā€”just kind of weird symbols that we can use. If I paste them here, you can see we have this full block, a dotted block, a short-sized block, and the same block as we were using at the beginning. Now, as I scroll down and refresh this once more, you can see we get these blocks coming up, which is pretty cool. Weā€™ll just refresh again.

Now, itā€™s quite fast, but there are more animation properties that we can use down here to make this look a little better. The first one Iā€™m going to use is split text. Iā€™m going to split everything up by characters. I also want to use stagger; Iā€™m using 1 second and setting this to be random. Each is taking way too long, so we want this to be a total of 1 second. Click on this to change it to the amount, and now you can see we get this really cool effect happening. If I save the timeline and then look at this on the front end, remember we have a title here. As soon as it hits the green line, we get this effect, and once again, we get this cool effect going on.

In the game itself, Hackmud, the game doesnā€™t really have these two characters, so if I remove them temporarily, it looks more like this. We can do random; we can even change this to 0.5 to make it much quicker. This looks a little more related to the game now, like soā€”a pretty cool effect. Once again, this was inspired by the Hackmud video game. I donā€™t believe weā€™ve done a video on scramble text before, so I thought Iā€™d show you an example of how you could use it.

If you liked this video, please donā€™t forget to give it a like and a thumbs up. If youā€™ve not already, please do consider subscribing, and weā€™ll be back soon with some more content for Motion Page. Thank you very much, guys.

100 %