Disable Flex App on TimeOut.

First define a Timer with the specified timeinterval.

var mTimer:Timer=new Timer(3000);  –> here 3 secs.

Now add eventlisteners as Timercomplete.

mTimer.addEventListener(TimerEvent.TIMER_COMPLETE,Comple);

start the Timer.At a needed location.

mTimer.start();

Now define the function as called from the EventListeners.[i.e Comple].

private function Comple(e:TimerEvent):void
{
//Disable the app with the line of code below.

this.enabled = false;

}

This will Disable the App after 3 secs.

There is a clear post on use of Timer below this post, read it to know the basics of the Timer.

Enjoy the code !. The below snashot is the disabled Flex app.

Disabled Flex App.

Advertisements

2 Responses to Disable Flex App on TimeOut.

  1. bob says:

    fwaNus hi good site thx http://peace.com

  2. bob says:

    Q8ugHE hi super site thanks http://peace.com

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: