Flash里的一些动作代码

来源:百度知道 编辑:UC知道 时间:2024/06/04 06:34:07
onClipEvent (load)
{
friction = 0.300000;
ratio = 1.120000;
targetY_pos = 10;
}
onClipEvent (enterFrame)
{
next_pos = (targetY_pos - this._y) * ratio * friction;
this._y = this._y + next_pos;
}

———————————————————————————————

on (rollOver)
{
this._parent.Arrow2.x1 = this._x - 30;
}
on (release)
{
getURL("bjfc_z1b.htm", "_self");
}

这些动作代码是什么意思啊??特别是:onClipEvent (load)和onClipEvent (enterFrame)

以下是一个影片剪辑元件的代码。
onClipEvent (load) 表示在影片剪辑的第一帧执行下面"{ }"中的代码
{
friction = 0.300000; 使一个函数——friction = 0.3
ratio = 1.120000; 使函数ratio = 1.12
targetY_pos = 10; 使targetY_pos = 10
}
onClipEvent (enterFrame) 表示在影片剪辑的每一帧执行下面"{ }"中的代码
{
next_pos = (targetY_pos - this._y) * ratio * friction; 使next_pos = targetY_pos 减 此影片剪辑的纵坐标 再乘以 ratio 和 friction ( 这些代码在onClipEvent(load)的时候都提到过。)
this._y = this._y + next_pos; 使此影片剪辑的纵坐标向下移动next_pos函数的距离
}

———————————————————————————————
以下是一个按钮元件的代码。
on (rollOver) 表示当鼠标移到按钮上时执行下面"{ }"中的代码
{
this._parent.Arrow2.x1 = this._x - 30; 使上一级元件里的 Arrow2 元件里的 x1 函数 = 此按钮的横坐标 减 30
}
on (release) 表示当鼠标点击按钮时执行下面"{ }"中的代码
{
getURL("bjfc_z1b.htm", "_self"); 连接到网站:bjfc_z1b.htm
}

就是这么多了,看不明白在找我。

onClipEvent (load)和onClipEvent (enterFrame) 都是进入影片剪辑的时候要触发{ }里的命令