Creating blinking text on a Spark RichText control in Flex 4

The following example shows how you can create a blinking text effect on a Spark RichText control in Flex 4 using a simple property animation with the Animate and SimpleMotionPath classes to tween the alpha property.

I’d like to dedicate this post to the two people that searched for this on my blog (who may be the only people to want to bring back the old HTML blinking text effect).

The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see To download the latest nightly build of the Flex 4 SDK, see

For more information on getting started with Flex 4 and Flash Builder 4, see the official Adobe Flex Team blog.

<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<s:Application name="Spark_RichText_blink_test"
        <s:HorizontalLayout horizontalAlign="center" verticalAlign="middle" />
        <s:Animate id="fader"
            <s:SimpleMotionPath property="alpha"
                    valueFrom="1.0" valueTo="0.0" />
    <s:Label id="lbl"
            text="BLINKING TEXT, I HATE YOU!"
            creationComplete=";" />

This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.

7 thoughts on “Creating blinking text on a Spark RichText control in Flex 4

  1. This is great. This post has made me research a bit about the Animate class which I have never used.
    I normally use TweenLite for this but if we can do it with the SDK it’s much better.

    Thanks for the post.

  2. Peter
    Sorry this is off topic but I recall reading one of your posts that described the technology and techniques behind your site.

    I can no longer find this post and can’t think of a keyword to search by.

    Can you help?


  3. Oops sorry for the overlap there but while I’m back I’d like to say Peter what an absolutely brilliant resource your website is for flex development.

    Over and out!


  4. Hi,
    iam searching to set the font color of an richtext into as3.
    Does someone know how i can do that ?
    for example, i want to write someething like this : “RichtextID.fontcolor = #ff0000 ;”

Comments are closed.