var time:int = 60;
var txt:TextField = new TextField;
txt.text = time.toString();
var bd:BitmapData = new BitmapData(100,20);
bd.draw(txt);
var bm:Bitmap = new Bitmap(bd);
var rect:Rectangle = new Rectangle(0,0,100,20);
this.addChild(bm);
bm.x = bm.y = 100;
bm.rotation = 0;
var timer:Timer = new Timer(1000,60);
timer.addEventListener(TimerEvent.TIMER,timerHandle);
timer.start();
function timerHandle(evt:TimerEvent):void{
time--;
txt.text = time.toString();
onPaint();
}
function onPaint():void{
bd.fillRect(rect,0xffffff);
bd.draw(txt);
bm.rotation = bm.rotation>360?0:bm.rotation+10;
}