我的程序不太漂亮 可能还有些BUG,而且有的地方还比较罗嗦,还需简化。最后 还要请大家指正。
原地址:http://www.cctv.com/recreation/index.shtml
点击浏览该文件
点击浏览该文件
r = 0;
function dy(mm) {//按钮条移动的缓冲效果;
onEnterFrame = function () {
dx = mm-mcc._y;
ax = 0.1*dx;
mcc._y += ax;
};
}
function dyy() {//按钮条移动的缓冲效果(用于鼠标移出按钮的时候);
onEnterFrame = function () {
dx = _root["mc"+r]._y-mcc._y;
ax = 0.1*dx;
mcc._y += ax;
};
r++;
if (r == 5) {
r = 1;
}
bigmc.gotoAndStop(r);
trace(r);
}
function ddy() {
m = setInterval(dyy, 3000);//三秒钟调用函数一次,即三秒中导航条下移一格;
}
ddy();//设置动画一开始就自动进行移动循环;
mc1.onRollOver = function() {
dy(this._y);//当鼠标移动上去的时候执行函数dy,下同;
r = 1;
clearInterval(m);//当鼠标移动上去的时候消除自动移动的效果,下同;
bigmc.gotoAndStop(1);
};
mc2.onRollOver = function() {
dy(this._y);
r = 2;
clearInterval(m);
bigmc.gotoAndStop(2);
};
mc3.onRollOver = function() {
dy(this._y);
r = 3;
clearInterval(m);
bigmc.gotoAndStop(3);
};
mc4.onRollOver = function() {
dy(this._y);
r = 4;
clearInterval(m);
bigmc.gotoAndStop(4);
};
mc1.onRollOut = function() {
ddy();//当鼠标移出的时候执行导航条自动移动函数,下同;
};
mc2.onRollOut = function() {
ddy();
};
mc3.onRollOut = function() {
ddy();
};
mc4.onRollOut = function() {
ddy();
};
Word教程网 | Excel教程网 | Dreamweaver教程网 | Fireworks教程网 | PPT教程网 | FLASH教程网 | PS教程网 |
HTML教程网 | DIV CSS教程网 | FLASH AS教程网 | ACCESS教程网 | SQL SERVER教程网 | C语言教程网 | JAVASCRIPT教程网 |
ASP教程网 | ASP.NET教程网 | CorelDraw教程网 |