FLASH代码!!高手帮忙!!

来源:百度知道 编辑:UC知道 时间:2024/06/07 11:44:27
onClipEvent (load) {
hx = 990/2;
hy = 400/2;
r = 100;
a = 30;
function speed(num) {
speedX = -(_root._xmouse-hx)/num;
return speedX;
}
function trans() {
p += speed(60);
range = ((p+288)*Math.PI)/180;
re1 = ((Math.sin(range))*r);
re2 = ((Math.cos(range))*a);
}
function property() {
trans();
_x = hx+re1;
_xscale = _yscale=_alpha=re2+70;
this.swapDepths(_alpha);
}
}
onClipEvent (enterFrame) {
property();

}

FLASH上是这段代码 什么意思?
还有 我想在鼠标点击的时候加上连接 怎么加??
我想知道怎么加链接。。。

连接直接选中对象.........属性面板里有一个地方专门加超连接的.......
==================================
onClipEvent (load) { //影片加载时
hx = 990/2; //这几段赋值不用解释了吧
hy = 400/2;
r = 100;
a = 30;
function speed(num) { //创建speed函数 返回值是num
speedX = -(_root._xmouse-hx)/num; //计算主场景鼠标X坐标- HX 再除以当前的返回值num
return speedX; //将当前的spedX的值返回到num
}
function trans() { //创建trans函数
p += speed(60);
range = ((p+288)*Math.PI)/180; //PI是圆周率...这个我不知道他要计算什么...
re1 = ((Math.sin(range))*r);计算range的sin值...再*r
re2 = ((Math.cos(range))*a); 同上
}
function property() { //创建property函数
trans(); //调用trans(之前创建的)
_x = hx+re1; //又是赋值......
_xscale = _yscale=_alpha=re2+70; //这个是计算半透明数值的
this.swapDepths(_alpha);//swapDepths这个函数没接触过...貌似是设置当前this对象的半透明的
}
}
onClipEvent (enterFrame) {
property();
//影片每播放一祯就调用一次property函数

}