点menu2 元件 第10帧有代码 AS2的代码就是这么乱的
复制内容到剪贴板
代码:
myURL = ["category21.htm", "category22.htm", "category23.htm", "category24.htm"];
for (i=1; i<=6; i++) {
sub[i].onRollOver = function() {
_global.over = this._parent._parent._name;
subOver = this._name;
};
sub[i].onRollOut = sub[i].onDragOut=function () {
_global.over = mainActive;
subOver = subActive;
};
sub[i].onRelease = function() {
getURL(myURL[this._name-1], "_self");
};
}
sub.bar.onEnterFrame = function() {
if (subOver) {
this._x += (this._parent[subOver]._x-this._x)/6;
this._xscale += (this._parent[subOver]._width+20-this._xscale)/6;
}else{
this._xscale = 0;
}
};