UID44
好友
注册时间2017-9-11
最后登录1970-1-1
在线时间 小时
积分37430
TA的每日心情 | 开心 2019-12-19 11:48 |
---|
签到天数: 238 天 [LV.7]常住居民III
|
本帖最后由 漫步人生 于 2018-10-9 10:23 编辑
- //新建as2.0文档(设置默认),在主场景第1帧粘贴以下语句【把文字 代码全部复制粘贴】
- //画背景并定位
- this.createEmptyMovieClip("beijing",this.getNextHighestDepth());
- with (beijing) {
- beginFill(0x666699);
- moveTo(0,0);
- lineTo(300,0);
- lineTo(300,370);
- lineTo(0,370);
- endFill();
- import flash.filters.*;
- filters = [new DropShadowFilter()];
- _x = 175;
- _y = 75;
- }
- //画小框并定位
- this.createEmptyMovieClip("xiaokuang",this.getNextHighestDepth());
- with (xiaokuang) {
- beginFill(0x000000);
- lineStyle(1,0x33cc33,100);
- moveTo(0,0);
- lineTo(280,0);
- lineTo(280,60);
- lineTo(0,60);
- endFill();
- _x = 185;
- _y = 100;
- }
- //画5个黑三角并定位
- this.createEmptyMovieClip("sanjiao",this.getNextHighestDepth());
- with (sanjiao) {
- beginFill(0x000000);
- moveTo(0,0);
- lineTo(12,7.5);
- lineTo(0,15);
- endFill();
- }
- sanjiao._visible = 0;
- for (i=1; i<=5; i++) {
- duplicateMovieClip("sanjiao", "sanjiao"+i, this.getNextHighestDepth());
- sanjiao1._x = 235;
- sanjiao2._x = 187;
- sanjiao3._x = 194;
- sanjiao4._x = 212;
- sanjiao5._x = 219;
- sanjiao2._xscale = sanjiao3._xscale=50;
- sanjiao4._xscale = sanjiao5._xscale=-50;
- sanjiao1._y = sanjiao2._y=sanjiao3._y=sanjiao4._y=sanjiao5._y=190;
- }
- //画2个矩形并定位
- this.createEmptyMovieClip("juxing",this.getNextHighestDepth());
- with (juxing) {
- beginFill(0x000000);
- moveTo(0,0);
- lineTo(5,0);
- lineTo(5,12);
- lineTo(0,12);
- endFill();
- }
- juxing._visible = 0;
- for (i=1; i<=2; i++) {
- duplicateMovieClip("juxing", "juxing"+i, this.getNextHighestDepth());
- juxing1._x = 257;
- juxing1._y = juxing2._y=191.5;
- juxing2._x = 264.2;
- }
- //画小喇叭并定位
- this.createEmptyMovieClip("laba",this.getNextHighestDepth());
- with (laba) {
- beginFill(0x000000);
- moveTo(0,4);
- lineTo(6,4);
- lineTo(12,0);
- lineTo(12,15);
- lineTo(6,10);
- lineTo(0,10);
- endFill();
- _x = 278;
- _y = 190;
- }
- //画音量控制的底图并定位
- this.createEmptyMovieClip("yinliangdi",this.getNextHighestDepth());
- with (yinliangdi) {
- beginFill(0x000000);
- moveTo(0,10);
- lineTo(70,0);
- lineTo(70,10);
- endFill();
- _x = 295;
- _y = 192;
- }
- //画音量控制滑块并能拖动
- this.createEmptyMovieClip("yinlianghuakuai",this.getNextHighestDepth());
- with (yinlianghuakuai) {
- beginFill(0x996600);
- moveTo(0,0);
- lineTo(6,0);
- lineTo(6,10);
- lineTo(0,10);
- endFill();
- _x = 359;
- _y = 192;
- }
- yinlianghuakuai.onPress = function() {
- startDrag(this, false, 295, 192, 359, 192);
- };
- yinlianghuakuai.onRelease = yinlianghuakuai.onReleaseOutside=function () {
- stopDrag();
- };
- //画显示进度的底图并定位
- this.createEmptyMovieClip("jindutiaodi",this.getNextHighestDepth());
- with (jindutiaodi) {
- beginFill(0x000033);
- moveTo(0,0);
- lineTo(180,0);
- lineTo(180,3);
- lineTo(0,3);
- endFill();
- _x = 185;
- _y = 185;
- }
- //画下载进度条并定位
- this.createEmptyMovieClip("xiazaijindutiao",this.getNextHighestDepth());
- with (xiazaijindutiao) {
- beginFill(0x663300);
- moveTo(0,0);
- lineTo(180,0);
- lineTo(180,3);
- lineTo(0,3);
- endFill();
- _x = 185;
- _y = 185;
- }
- //画播放进度条并定位
- this.createEmptyMovieClip("bofangjindutiao",this.getNextHighestDepth());
- with (bofangjindutiao) {
- beginFill(0x009900);
- moveTo(0,0);
- lineTo(180,0);
- lineTo(180,3);
- lineTo(0,3);
- endFill();
- _x = 185;
- _y = 185;
- }
- //创建“已下载”文本
- this.createTextField("yixiazai_txt",this.getNextHighestDepth(),185,165,0,0);
- my_fmt = new TextFormat();
- my_fmt.font = "宋体";
- my_fmt.color = 0x000000;
- my_fmt.size = 12;
- yixiazai_txt.text = "已下载:";
- yixiazai_txt.autoSize = true;
- yixiazai_txt.setTextFormat(my_fmt);
- //创建“已播放”文本
- this.createTextField("yibofang_txt",this.getNextHighestDepth(),285,165,0,0);
- my_fmt = new TextFormat();
- my_fmt.font = "宋体";
- my_fmt.color = 0x000000;
- my_fmt.size = 12;
- yibofang_txt.text = "已播放:";
- yibofang_txt.autoSize = true;
- yibofang_txt.setTextFormat(my_fmt);
- //创建显示“下载百分比”的动态文本
- this.createTextField("xiazaibfb_txt",this.getNextHighestDepth(),240,163,0,0);
- my_fmt = new TextFormat();
- my_fmt.font = "宋体";
- my_fmt.color = 0x000000;
- my_fmt.size = 12;
- xiazaibfb_txt.autoSize = true;
- xiazaibfb_txt.setTextFormat(my_fmt);
- //创建显示“播放百分比”的动态文本
- this.createTextField("bofangbfb_txt",this.getNextHighestDepth(),340,163,0,0);
- my_fmt = new TextFormat();
- my_fmt.font = "宋体";
- my_fmt.color = 0x000000;
- my_fmt.size = 12;
- bofangbfb_txt.autoSize = true;
- bofangbfb_txt.setTextFormat(my_fmt);
- //创建5个分别覆盖在“快进”、“快退”、“播放”、“暂停”和“喇叭”上的隐形按钮
- this.createEmptyMovieClip("yinxinganniu",this.getNextHighestDepth());
- with (yinxinganniu) {
- beginFill(0xffffff,30);
- moveTo(0,0);
- lineTo(15,0);
- lineTo(15,15);
- lineTo(0,15);
- endFill();
- _x = 185;
- _y = 190;
- }
- yinxinganniu._visible = 0;
- for (i=1; i<=5; i++) {
- duplicateMovieClip(yinxinganniu, "yinxinganniu"+i, this.getNextHighestDepth());
- this["yinxinganniu"+i]._x = 185+22.8*(i-1);
- this["yinxinganniu"+i]._y = 190;
- this["yinxinganniu"+i]._alpha = 0;
- this["yinxinganniu"+i].onRollOver = function() {
- this._alpha = 70;
- };
- this["yinxinganniu"+i].onRollOut = function() {
- this._alpha = 0;
- };
- }
- //快进
- yinxinganniu1.onPress = function() {
- mysound.stop();
- mysound.start(mysound.position/1000+10);
- };
- //快退
- yinxinganniu2.onPress = function() {
- mysound.stop();
- mysound.start(mysound.position/1000-10);
- };
- //播放
- yinxinganniu3.onPress = function() {
- if (tt) {
- mysound.stop();
- mysound.start(tt);
- } else {
- mysound.stop();
- mysound.start(0);
- }
- for (i=1; i<=20; i++) {
- _root["dianpingtiao"+i]._visible = 1;
- }
- };
复制代码
紧接下面的代码 |
评分
-
参与人数 3 | 威望 +23 |
金钱 +23 |
贡献 +23 |
收起
理由
|
红松故乡
| + 7 |
+ 7 |
+ 7 |
非常精彩! |
雪墨
| + 9 |
+ 9 |
+ 9 |
谢谢分享,论坛有您更精彩! |
岩新新
| + 7 |
+ 7 |
+ 7 |
非常精彩! |
查看全部评分
|