Icon Text

To finish off the series on BB code I'll cover the newest edition to Text, Icon text.
Basically the feature allows you to treat a Sprite like an extra glyph in your fonts.
Its pretty neat when you want to include some social media logos in your text...


To start we upload the frames we want to use into a Sprite object. Here we see frame zero, and frame one.
You can use the tag part, but an indexed method seems best to me.






Place the text you will using along with setting any fonts.







As usual I'll use the Tween behavior on the text to set up the animation effects.







For the first effect, the slide in, we will need to make text have the left horizontal alignment. Remember adding text will make the text adjust itself, unless the new text is at the end and.
Also this is where you set the icon set.













The object picker should be pretty easy to figure out.













For the events:
+ System: On start of layout
-> Audio: Play music_fx_a_synthwave_cyberpunk_song_with_a_retro_beat.webm not looping at volume 0 dB (stereo pan 0, tag "")
-> Audio: Fade "" volume to -100 dB over 25 seconds, then stop
-> System: Wait 0.5 seconds
-> introText: Tween "" property Z Elevation to 0 in 0.25 seconds (Out Exponential, destroy: No, loop: No, ping pong: No, repeat count: 1)
-> System: Wait 1.0 seconds
-> Text: Tween "please" value from -200 to 0 in 0.75 seconds (Out Sinusoidal, destroy: No, loop: No, ping pong: No, repeat count: 1)
We start a tween called "please" and we will chain all the other tweens from there.
+ Text: Is Tween "please" playing
-> Text: Set text to "[offsetx="&Text.Tween.Value("please")&"%]Please Like "
Tweening the "Please Like" text from -200 to 0 on the x axis
+ Text: On Tween "please" finished
-> System: Wait 0.10 seconds
-> Text: Tween "ico0" value from -120 to 0 in 1 seconds (Out Bounce, destroy: No, loop: No, ping pong: No, repeat count: 1)
Trigger the Tween in of the icon when that's done.
+ Text: Is Tween "ico0" playing
-> Text: Set text to "[iconoffsety="&Text.Tween.Value("ico0")&"%]Please Like [icon=0]"
Note icon=0 refers to the 0 frame
+ Text: On Tween "ico0" finished
-> System: Wait 1.5 seconds
-> Text: Tween "out" value from 0 to -300 in 0.25 seconds (Default, destroy: No, loop: No, ping pong: No, repeat count: 1)
Trigger when that's done...
+ Text: Is Tween "out" playing
-> Text: Set text to "[offsety="&Text.Tween.Value("out")&"%]Please Like [icon=0]"
So slide out the text, along the y axis.
+ Text: On Tween "out" finished
-> Text: Typewriter text "and" over 1 seconds
Next trigger, but using Typewriter text.
+ Text: On typewriter text finished
-> System: Wait 1.5 seconds
-> Text: Tween "ico1" value from 300 to 0 in 1.25 seconds (Out Circular, destroy: No, loop: No, ping pong: No, repeat count: 1)
Tween in the next icon, icon 1.
+ Text: Is Tween "ico1" playing
-> Text: Set text to "[iconoffsety="&Text.Tween.Value("ico1")&"%]and [icon=1]"
The icons themselves have an x axis to animate as well.
+ Text: On Tween "ico1" finished
-> System: Wait 5 seconds
-> Text: Tween "" property Opacity to 0 in 5 seconds (Default, destroy: No, loop: No, ping pong: No, repeat count: 1)
Fade out when done.

Find the source here



Comments