#12002/2/8 17:05:14
你好!
我学习《深入Flash5编程》,对书中第20面的dragging和angularSpeed不理解。望能赐教。
原代码:
onClipEvent(enterFrame){
oldAngle=newAngle;
newAngle=Math.atan2(_root._ymouse-200,_root._xmouse-
275)*360/(2*Math.PI);
if(dragging==true){
_root.flower._rotation+=newAngle-oldAngle;
}else{
_root.flower._rotation+=angularSpeed;
angularSpeed*=.98;
}
updateAfterEvent();
}