www.mutationevent.com

Articles taggés avec ‘CountDown’

as3 CountDown

Samedi 8 août 2009

Réaliser un compte a rebours facilement avec as3.

Nous aurons besoin un champ de texte pour afficher la date, un timer et la classe CountDown de Kazuma Ieiri.

code as 3

import flash.utils.Timer;
import flash.events.TimerEvent;
import jp.hbkr.baka.CountDown;
 
var timer:Timer = new Timer(1000);
var a:Array;
 
timer.addEventListener(TimerEvent.TIMER, tick);
timer.start();
 
function tick(event:TimerEvent):void
{
a = CountDown.getCountDown(2010, 1, 1, 12, 0, 0);
timerContentTXT.text = a[0]+" Jours "+a[1]+" H " + a[2] + " mn et " + a[3]+"s";
}

Télécharger la source ici CountDown (77)

Technorati Tags: as3, compte a rebours, CountDown, flash, timer

  • Twitter
  • Facebook
  • Digg
  • Delicious
  • Google Reader
  • LinkedIn
  • Technorati Favorites
  • Netvibes Share
  • NewsVine
  • Share/Bookmark

  • Archives

  • Catégories