今天白天觉得比较充实。。晚间放松。。
package{
import flash.display.Sprite;
import flash.events.TimerEvent;
import flash.utils.Timer;
public class Oct2502 extends Sprite{
private var _Square:Sprite;
private var _Circle:Sprite;
public function Oct2502(){
_Square=new Sprite();
_Square.graphics.beginFill(0xff0000);
_Square.graphics.drawRect(0,0,100,100);
_Square.graphics.endFill();
addChild(_Square);
_Square.x=100;
_Square.y=50;
_Circle=new Sprite();
_Circle.graphics.beginFill(0x0000ff);
_Circle.graphics.drawCircle(50,50,50);
_Circle.graphics.endFill();
addChild(_Circle);
_Circle.x=100;
_Circle.y=200;
var SquareTimer:Timer=new Timer(50,0);
SquareTimer.addEventListener(TimerEvent.TIMER,onSquareTimer);
SquareTimer.start();
var CircleTimer:Timer=new Timer(100,0);
CircleTimer.addEventListener(TimerEvent.TIMER,onCircleTimer);
CircleTimer.start();
}
private function onSquareTimer(event:TimerEvent){
_Square.x++;
}
private function onCircleTimer(event:TimerEvent){
_Circle.x++;
}
}
}
posted on 2008-10-25 22:00
正牌的天地之灵和他的徒儿们肖赫_王婷婷_王冠_郑燚_孙婷 阅读(72)
评论(0) 编辑 收藏 引用 所属分类:
糖糖