Blinking Label in Flex

I was working on a project and I had to come up with a BlinkingLabel; label/text that blinks giving the user some alert/messaging signal. After trying the internet to no avail, I had to deep my head in the toolbox and cook something up. I hope this helps someone. I would also love any bug, improvement and the likes posted to this blog.

Code after jump::

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Label xmlns:mx=”; creationComplete=”init()”>

import mx.effects.Parallel;
import mx.effects.Fade;

private var fadeTimer:Timer = new Timer(700);

private function init():void
fadeTimer.addEventListener(TimerEvent.TIMER, timerFunction);

public function startBlink():void

private function timerFunction(event:TimerEvent):void


<mx:BlurFilter blurX=”0″ blurY=”0″/>

<mx:Parallel id=”activeplay”>
<mx:Fade id=”fadeIn” alphaFrom=”0.0″ alphaTo=”1.0″ target=”{this}” duration=”250″/>
<mx:Fade id=”fadeOut” alphaFrom=”1.0″ alphaTo=”0.0″ target=”{this}” duration=”250″/>


So to use this just add it into your application, say, <widgets:BlinkingLabel text=”I am blinking”/> and that should do it.

Note that the name of the component as I named it is BlinkingLabel as you must have guessed.






One thought on “Blinking Label in Flex

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s