flash actionScript 问题

来源:百度知道 编辑:UC知道 时间:2024/06/07 16:25:19
我想要当滑鼠移到一个图片时,自然就会在旁边显示"文字框"(类是tooltips),当滑鼠移走就会自己不见…
Flash的actionScript2.0 应该怎样写啊??
还不是很明白,麻烦清楚,详细点,谢谢。。。

让文本框是个影片剪辑,制作动画
1帧~5帧,显示
6帧~10帧,消失
在动画的第一帧和第六帧插入AS为Stop();
把图片设置为按钮,按钮上AS如下:
on (rollOver)
{
tellTarget("mc")
{
gotoAndPlay(2);
}
}
on (rollOut)
{
tellTarget("mc")
{
gotoAndPlay(6);
}
}

做4个MC 叫b1 b2 b3 b4

每个MC第一真是没点的状态 后面是点了之后的状态

第1真和之后一真加 STOP

下面代码放到外面时间轴

stop();
bnum = 4;
for (i=1; i<=bnum; i++) {
this["b"+i].onRollOver = function() {
_global.current = Number(this._parent._name);
this.over = 1;
this.swapDepths(100);
};
this["b"+i].onRollOut = function() {
this.over = 0;
_global.current = 0;
};
};
this["b"+i].onDragOut = function() {
this.over = 0;
_global.current = 0;
};
this["b"+i].onEnterFrame = function() {
if (this.over) {