AS的脚本含义要求每行加上注释.敷衍了事的就别回答了.说的好的在多给50分.function fun1(){var _loc1 = _root;num = num + 1;_loc1.b1.gotoAndStop(1);_loc1.b2.gotoAndStop(1);_loc1.b3.gotoAndStop(1);_loc1.b4.gotoAndStop(1);_loc1.
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/26 03:17:08
AS的脚本含义要求每行加上注释.敷衍了事的就别回答了.说的好的在多给50分.function fun1(){var _loc1 = _root;num = num + 1;_loc1.b1.gotoAndStop(1);_loc1.b2.gotoAndStop(1);_loc1.b3.gotoAndStop(1);_loc1.b4.gotoAndStop(1);_loc1.
AS的脚本含义
要求每行加上注释.敷衍了事的就别回答了.说的好的在多给50分.
function fun1()
{
var _loc1 = _root;
num = num + 1;
_loc1.b1.gotoAndStop(1);
_loc1.b2.gotoAndStop(1);
_loc1.b3.gotoAndStop(1);
_loc1.b4.gotoAndStop(1);
_loc1.b5.gotoAndStop(1);
_loc1.b6.gotoAndStop(1);
_loc1["b" + num].gotoAndStop(2);
if (num == 1)
{
_loc1.img.a2 = 0;
_loc1.img.a3 = 0;
_loc1.img.a4 = 0;
_loc1.img.a5 = 0;
_loc1.img.a6 = 0;
} // end if
_loc1.img["a" + num] = 100;
if (num == 6)
{
num = 0;
_loc1.img.a1 = 0;
_loc1.img.a2 = 0;
_loc1.img.a3 = 0;
_loc1.img.a4 = 0;
_loc1.img.a5 = 0;
} // end if
} // End of the function
MovieClip.prototype.smoothMove = function (a,ty)
{
this._y = a * (this._y - ty) + ty;
};
MovieClip.prototype.alpha = function (a,ty)
{
this._alpha = a * (this._alpha - ty) + ty;
};
gap = 10000;
setInterval(this,"fun1",gap);
MovieClip.prototype.select = function (a)
{
var _loc1 = _root;
_loc1.img.a1 = 0;
_loc1.img.a2 = 0;
_loc1.img.a3 = 0;
_loc1.img.a4 = 0;
_loc1.img.a5 = 0;
_loc1.img.a6 = 0;
_loc1.img["a" + num] = 100;
_loc1.b1.gotoAndStop(1);
_loc1.b2.gotoAndStop(1);
_loc1.b3.gotoAndStop(1);
_loc1.b4.gotoAndStop(1);
_loc1.b5.gotoAndStop(1);
_loc1.b6.gotoAndStop(1);
_loc1["b" + num].gotoAndStop(2);
_loc1.num = a;
};
_root.img.a1 = 100;
num = 1;
_root.b1.gotoAndStop(2);
AS的脚本含义要求每行加上注释.敷衍了事的就别回答了.说的好的在多给50分.function fun1(){var _loc1 = _root;num = num + 1;_loc1.b1.gotoAndStop(1);_loc1.b2.gotoAndStop(1);_loc1.b3.gotoAndStop(1);_loc1.b4.gotoAndStop(1);_loc1.
AS的程序是要结合FLA工程文件看的.现在没有工程文件.
在我解释代码之前我作如下假设/猜想:
1.这是一个类似于相册的一个flash,支持6张图片.
2.img是_root场景中的一个movieclip,它里面有a1~a6六个变量.
3.a1~a6变量分别设定了六张图片的状态(0为隐藏或黑白,100为显示该图)
4._root场景里除了img之外,还有b1~b6等6个movieclip.
5.b1~b6都至少有2帧,第一帧为隐藏(或者变成灰色等),第二帧为显示图片.
然后开始解释代码.
//
每句代码都讲到了,以上假设也是读了代码分析出来的,但是一切以工程中的内容为准.
有问题可以加我Q:17424317