欢迎访问服务器技术网-www.fuwuqijishu.com

我想做一个音量控制的flash效果。

软件 fuwuqijishu 2年前 (2022-10-01) 29次浏览 0个评论 扫描二维码

关于应该怎么做呢?的问题

先导入声音文件
步骤:
1 导入声音文件到库
2 选择库中的声音文件 为其加上链接(库的右上角有一链接菜单 为其命名为mySound)
3 在主场景中第一帧添加代码:
s = new Sound();
tachSound(“mySound”);
art();
以上是用代码来链接声音文件
以下是制作音量控制的步骤:
1 制作一个按钮
2 把铵钮拖到场景中
3 选择按钮 右键 – 转为影片剪辑 slide
4 选择slide 为里面的按钮输入代码
on(press){
startDrag(“”,false,left,top,right,bottom);
dragging =true;
}
on(release, releaseOutside){
stopDrag();
dragging = false;
}
5 回到主场景中 选择slide 并添加代码:
onClipEvent(load){ //只允许按钮上下移动
left = _x;
right = _x;
top = _y;
bottom = _y+100;
}
onClipEvent(enterFrame){
if(dragging == true){
_ tVolume(100 – (_y-top)); //设置音量大小的函数
}
}
完成
效果见附件。

喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

Warning: error_log(/www/wwwroot/fuwiqijishu/wp-content/plugins/spider-analyser/#log/log-2717.txt): failed to open stream: No such file or directory in /www/wwwroot/fuwiqijishu/wp-content/plugins/spider-analyser/spider.class.php on line 2900