2007/07/29

我终于可以看到逆时针旋转了

原图我只能看出顺时针旋转,当把所有帧反转后(帧频不变的情况下)可以看到两种旋转或交替出现。点击图片反转所有帧,把帧频调低有利于观察。

this.stage.frameRate = 17;
rate
.text = "17 fps";
thumb.addEventListener(MouseEvent.MOUSE_DOWN, starter);
thumb.addEventListener(MouseEvent.MOUSE_UP, stopper);
thumb.addEventListener(MouseEvent.MOUSE_OUT, stopper);
thumb.addEventListener(MouseEvent.MOUSE_MOVE, mover);
function
starter(args:Event) {
thumb.startDrag(false, new Rectangle(track.x, thumb.y, track.width, 0));
}

function
stopper(args:Event) {
thumb.stopDrag();
}

function
mover(args:Event) {
if
(thumb.x>=track.x) {
var
dist:Number = (thumb.x - track.x) / (track.width + track.x);
//trace(dist);

this
.stage.frameRate = Math.round(dist*200);
rate
.text = Math.round(dist*200).toString() + " fps";
}
}

var
isre:Boolean=false;
function
rplayer(event:MouseEvent):void {
if
(isre==false) mc.gotoAndPlay("reverse");
else
mc.gotoAndPlay("normal")
isre=!isre;
}

mc.addEventListener(MouseEvent.CLICK, rplayer);

Labels: ,