点击浏览该文件
点击浏览该文件AS如下:
for (var i = 1; i<=70; i++) {
attachMovie("arrow", i, i);
_root[i]._x = 50+i%10*50;
_root[i]._y = Math.ceil(i/10)*50;
_root[i].onMouseMove = function() {
xsm = _root._xmouse-this._x;
ysm = _root._ymouse-this._y;
if (xsm<0) {
this._rotation = Math.atan(ysm/xsm)*360/(2*Math.PI);
} else {
this._rotation = Math.atan(ysm/xsm)*360/(2*Math.PI)+180;
}
rr = 256*Math.abs(xsm)/550;
gg = 256*Math.abs(ysm)/400;
bb = Math.sqrt(rr*rr+gg*gg);
myColor = new Color(this);
myColor.setRGB(rr << 16 | gg << 8 | bb);
updateAfterEvent();
};
}
旋转不稀奇变色的部分可以看看
假如把以下改一下 rr = 256*Math.abs(xsm)/
275
gg = 256*Math.abs(ysm)/
200//这样效果会更好,呵呵。
点击浏览该文件