帮解释一下,flash as3代码,初学者,麻烦帮加点注释
numOfMenu=5;_global.active=pageNum;_global.over=active;for(i=1;i<=numOfMenu;i++){this...
numOfMenu = 5;
_global.active = pageNum;
_global.over = active;
for (i=1; i<=numOfMenu; i++) {
this[i].mainText.gotoAndStop(i);
this[i].mainTextBg.gotoAndStop(i);
this[i].mainTextBg.mainText.gotoAndStop(i);
//鼠标移入
this[i].bg.onRollOver = function() {
_global.over = this._parent._name;
};
//鼠标移出
this[i].bg.onRollOut = this[i].bg.onDragOut=function () {
_global.over = active;
};
this[i].bg.onRelease = function() {
getURL(myURL[this._parent._name-1], "_self");
};
this[i].onEnterFrame = function() {
if (over == this._name) {
this.nextFrame();
} else {
this.prevFrame();
}
};
} 展开
_global.active = pageNum;
_global.over = active;
for (i=1; i<=numOfMenu; i++) {
this[i].mainText.gotoAndStop(i);
this[i].mainTextBg.gotoAndStop(i);
this[i].mainTextBg.mainText.gotoAndStop(i);
//鼠标移入
this[i].bg.onRollOver = function() {
_global.over = this._parent._name;
};
//鼠标移出
this[i].bg.onRollOut = this[i].bg.onDragOut=function () {
_global.over = active;
};
this[i].bg.onRelease = function() {
getURL(myURL[this._parent._name-1], "_self");
};
this[i].onEnterFrame = function() {
if (over == this._name) {
this.nextFrame();
} else {
this.prevFrame();
}
};
} 展开
3个回答
展开全部
numOfMenu = 5;
_global.active = pageNum; //定义全局变量
_global.over = active;//定义全局变量
//跳转帧
for (i=1; i<=numOfMenu; i++) {
this[i].mainText.gotoAndStop(i);
this[i].mainTextBg.gotoAndStop(i);
this[i].mainTextBg.mainText.gotoAndStop(i);
//鼠标移入
this[i].bg.onRollOver = function() {
_global.over = this._parent._name;
};
//鼠标移出
this[i].bg.onRollOut = this[i].bg.onDragOut=function () {
_global.over = active;
};
this[i].bg.onRelease = function() {
//在当前帧打开一个网页
getURL(myURL[this._parent._name-1], "_self");
};
//响应帧事件
this[i].onEnterFrame = function() {
if (over == this._name) {
//跳转到场景
this.nextFrame();
} else {
this.prevFrame();
}
};
}
_global.active = pageNum; //定义全局变量
_global.over = active;//定义全局变量
//跳转帧
for (i=1; i<=numOfMenu; i++) {
this[i].mainText.gotoAndStop(i);
this[i].mainTextBg.gotoAndStop(i);
this[i].mainTextBg.mainText.gotoAndStop(i);
//鼠标移入
this[i].bg.onRollOver = function() {
_global.over = this._parent._name;
};
//鼠标移出
this[i].bg.onRollOut = this[i].bg.onDragOut=function () {
_global.over = active;
};
this[i].bg.onRelease = function() {
//在当前帧打开一个网页
getURL(myURL[this._parent._name-1], "_self");
};
//响应帧事件
this[i].onEnterFrame = function() {
if (over == this._name) {
//跳转到场景
this.nextFrame();
} else {
this.prevFrame();
}
};
}
AiPPT
2024-09-19 广告
2024-09-19 广告
随着AI技术的飞速发展,如今市面上涌现了许多实用易操作的AI生成工具1、简介:AiPPT: 这款AI工具智能理解用户输入的主题,提供“AI智能生成”和“导入本地大纲”的选项,生成的PPT内容丰富多样,可自由编辑和添加元素,图表类型包括柱状图...
点击进入详情页
本回答由AiPPT提供
2013-04-11
展开全部
这个是as2的吧。。不是as3的
numOfMenu = 5;
_global.active = pageNum; //初始化赋值
_global.over = active; //初始化赋值
for (i=1; i<=numOfMenu; i++) {
this[i].mainText.gotoAndStop(i); //this[i]不知道是代表什么,他下面的 mainText播放到第i帧停止
后面3句 一样
this[i].mainTextBg.gotoAndStop(i);
this[i].mainTextBg.mainText.gotoAndStop(i);
//鼠标移入
this[i].bg.onRollOver = function() {
_global.over = this._parent._name; //鼠标经过bg时,把over重新赋值为this[i]的name
};
//鼠标移出
this[i].bg.onRollOut = this[i].bg.onDragOut=function () {
_global.over = active; //鼠标移出bg或鼠标移动到播放器外面,把over重新赋值为active
};
this[i].bg.onRelease = function() {
getURL(myURL[this._parent._name-1], "_self"); //点击this[i]中的bg,打开连接
};
this[i].onEnterFrame = function() { //循环执行this[i]
if (over == this._name) { //over的值跟this[i]的name相等
this.nextFrame(); this[i]播放下一帧
} else {
this.prevFrame(); 否则播放前一帧
}
};
}
不知道具体是干什么用的,只能根据语句来解释了。。乱七八糟的。
numOfMenu = 5;
_global.active = pageNum; //初始化赋值
_global.over = active; //初始化赋值
for (i=1; i<=numOfMenu; i++) {
this[i].mainText.gotoAndStop(i); //this[i]不知道是代表什么,他下面的 mainText播放到第i帧停止
后面3句 一样
this[i].mainTextBg.gotoAndStop(i);
this[i].mainTextBg.mainText.gotoAndStop(i);
//鼠标移入
this[i].bg.onRollOver = function() {
_global.over = this._parent._name; //鼠标经过bg时,把over重新赋值为this[i]的name
};
//鼠标移出
this[i].bg.onRollOut = this[i].bg.onDragOut=function () {
_global.over = active; //鼠标移出bg或鼠标移动到播放器外面,把over重新赋值为active
};
this[i].bg.onRelease = function() {
getURL(myURL[this._parent._name-1], "_self"); //点击this[i]中的bg,打开连接
};
this[i].onEnterFrame = function() { //循环执行this[i]
if (over == this._name) { //over的值跟this[i]的name相等
this.nextFrame(); this[i]播放下一帧
} else {
this.prevFrame(); 否则播放前一帧
}
};
}
不知道具体是干什么用的,只能根据语句来解释了。。乱七八糟的。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这明显是as2
追问
是的,打错了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询