• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Event handlers from clock time

New Here ,
May 05, 2010 May 05, 2010

Copy link to clipboard

Copied

I would like to base some event handlers on clock times on a 24 hour schedule... is this possible?

Views

325

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2010 May 06, 2010

Copy link to clipboard

Copied

Like... for example..... Say I want to trigger an event at 13:00:45 is it possible to create a listener for that?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2010 May 06, 2010

Copy link to clipboard

Copied

Hello?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 25, 2010 May 25, 2010

Copy link to clipboard

Copied

LATEST

Hi,

This should do the trick.

var t:Timer;
var currentTime:Date= new Date;
var requiredTime:Date = new Date(2010,04,25,19,53,0);// Give the time you would like to give
var delayTime:Number= requiredTime.time - currentTime.time;
t=new Timer(delayTime);
t.addEventListener(TimerEvent.TIMER,onTimer);
t.start();

The event listener should be like this:-

function onTimer(event:TimerEvent):void

{
            //Necessary handling code
}

Hope this helps

Nishad

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines