关于一个网站FLASH导航条的制作
来源:互联网 发布:激战2阿苏拉捏脸数据 编辑:程序博客网 时间:2024/04/19 16:15
这里的代码是抄袭过来的,根本是为了说明问题和解决问题:)
var drag =0.1;
//震动参数
var flex =0.7;
//震动参数
mc._y =20;
mc.goalX =10; //装入动画后影片剪辑(也就是滑块)首先出现的位置
mc.onEnterFrame = function() {
this.Step =this.Step*flex+(this.goalX-this.px)*drag; //计算滑块移动步长的公式
this.px+=this.Step; //将步长累加,个人认为这个很重要,相当于一个循环,以本次移动步长为基准,进行下次累加
this._x =this.px; //使影片剪辑的X坐标轴等于
if (this.sOut && this._xscale<99.5) { /*这里是缩放影片剪辑*/
this._xscale += (100-this._xscale)/8;
}
if (this.sIn && this._xscale>0.1) {
this._xscale += -this._xscale/8;
}
};
////The First Button Events
b1.onRollOver = function() {
mc.goalX =this._x; //将按钮的X坐标值赋给影片剪辑的初始位置,也就是说,下次移动以这次的位置为原点这里根据按 钮和影片剪辑的大小而定,若按钮比影片剪辑小,相应的加上一些数值以作调节
mc.sOut = true; /*这里是把一个BOOBLE值返回给调用它的函数,如下:
if (this.sOut && this._xscale<99.5),以控制整个影片剪辑的缩放功能*/
mc.sIn = false;
this.fadeOut = true;
this.fadeIn = false;
};
b1.onRollOut = function() {
mc.sOut = false;
mc.sIn = true;
this.fadeIn = true;
this.fadeOut = false;
};
//The second Button Events
b2.onRollOver = function() {
mc.goalX =this._x;
mc.sOut = true;
mc.sIn = false;
this.fadeOut = true;
this.fadeIn = false;
};
b2.onRollOut = function() {
mc.sOut = false;
mc.sIn = true;
this.fadeIn = true;
this.fadeOut = false;
};
//The Third Button Events
b3.onRollOver = function() {
mc.goalX =this._x;
mc.sOut = true;
mc.sIn = false;
this.fadeOut = true;
this.fadeIn = false;
};
b3.onRollOut = function() {
mc.sOut = false;
mc.sIn = true;
this.fadeIn = true;
this.fadeOut = false;
};
//The Fourth Button Events
b4.onRollOver = function() {
mc.goalX =this._x;
mc.sOut = true;
mc.sIn = false;
this.fadeOut = true;
this.fadeIn = false;
};
b4.onRollOut = function() {
mc.sOut = false;
mc.sIn = true;
this.fadeIn = true;
this.fadeOut = false;
};
//The Fifth Button Events
b5.onRollOver = function() {
mc.goalX =this._x;
//trace(mc.goalX);
mc.sOut = true;
mc.sIn = false;
this.fadeOut = true;
this.fadeIn = false;
};
b5.onRollOut = function() {
mc.sOut = false;
mc.sIn = true;
this.fadeIn = true;
this.fadeOut = false;
};
stop();
- 关于一个网站FLASH导航条的制作
- 制作一个网站的导航菜单
- 导航条的制作
- 导航条的制作
- 纯CSS制作简洁的垂直网站导航条
- 一个用as做出的FLASH导航条代码
- 【小技巧】制作一个滑动过渡切换的导航条
- android导航条的制作
- JQuery制作的导航条
- 导航条菜单的制作
- 简单的导航条制作
- 导航条菜单的制作
- 关于css 以及网站导航条 杂记
- 一个导航条的例子
- 一个导航条的进化
- Photoshop轻松制作Apple网站导航条按钮
- Bootstrap 教程第二课:制作网站导航条
- div+css 导航条的制作?
- 请问如何通过企业管理器将Access数据库的数据导入 SQL Server数据库?
- 五种提高 SQL 性能的方法
- 配置CVS服务器和客户端完全解析
- CVS服务器建立和权限配置(zz)
- C#也有这个BUG吗?
- 关于一个网站FLASH导航条的制作
- ehlib控件资料
- ASP Tools for Software Development
- ehlib控件资料2
- 成长中必须知道的20个故事
- ehlibk控件资料3
- ehlib控件资料4
- 微调您的 Web 站点以适应 Windows XP Service Pack 2
- 智能客户端 Offline Application Block附录 A – 测试用例