- 浏览: 228743 次
- 性别:
- 来自: 海南海口
文章分类
- 全部博客 (114)
- java基础 (25)
- 设计模式 (6)
- css (1)
- js (2)
- jquery (5)
- flash as3.0 (3)
- lucene (2)
- tomcat (3)
- uml (0)
- struts2 (7)
- spring (0)
- sql (1)
- ejb3.0 (2)
- jbpm4 (1)
- webservices (1)
- linux (3)
- ajax (1)
- 面试 (1)
- flex (0)
- soa (0)
- oracle解锁 (5)
- 工具 (3)
- ext (3)
- 好的网址 (1)
- junit (2)
- jmx (2)
- encache (1)
- redis (1)
- 网站 (1)
- oracle重要的sql (1)
- web (3)
- hadoop (2)
- DB2 (1)
- ui (1)
- sybase (1)
- ue使用快捷键 (1)
- eclipse优化 (1)
- 前端优化用到的插件 (1)
- zookeeper (1)
- solr (1)
- hibernate (1)
- svn (1)
- resion (1)
- resin (1)
- maven (1)
- mysql (1)
- url (1)
- 通过HttpFileServer设置共享 可以通过http方式访问 (1)
- 非技术 (2)
- 营销 (1)
- ELK (3)
最新评论
-
it_xiaowu:
jqwerty_123 写道我的出同样的问题却是因为引入cxf ...
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Ma -
繁星水:
实验证明可用,最后补充一下,可以不需要 set Package ...
axis根据wsdl生成java客户端代码 -
qq_16699317:
qq_16699317 写道求一份源代码,感激不尽。。。多谢了 ...
java博客系统 -
qq_16699317:
求一份源代码,感激不尽。。。多谢了
java博客系统 -
jqwerty_123:
我的出同样的问题却是因为引入cxf的时候jcl-over-sl ...
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Ma
这些都是很久以前写的了,为了备份就贴上来了,供需要的可以参考参考!这是我第一次学as的时候写得代码,一下子写了400百行,虽然写得很乱(尤其是类的整理方面),感觉还不错,懂的很多!
下面就是我的代码:
package {
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.net.URLRequest;
import flash.display.Shape;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.display.SimpleButton;
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.net.FileReferenceList;
import flash.events.MouseEvent;
import flash.media.SoundLoaderContext;
import flash.text.TextField;
import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.geom.Rectangle;
import flash.media.SoundTransform;
import flash.utils.ByteArray;
import flash.display.Graphics;
import flash.media.SoundMixer;
import flash.net.FileFilter;
import flash.display.Loader;
public class bofangqi6 extends Sprite {
private var liebiao:Array=["坐火车去拉萨-韩红","你的承诺-海鸣威","水中花-谭咏麟","一场游戏一场梦-王杰","感动天感动地-宇桐","一生中最爱-谭咏麟","天若有情-胡彦斌","诀别诗-胡彦斌","三生三世-陈瑞","愿望-胡彦斌","我的未来不是梦-张雨生","等一分钟-胡彦斌","漫步人生路-邓丽君","想太多-李玖哲","我们的纪念-李雅微","有没有告诉你-陈楚生","突然的自我-伍佰","擦肩而过-宇桐非","没有你我很孤单-刘佳","天使-五月天"];
private var url1:Array=["http://itv.chinatibetnews.com/asset/category3/2008/07/29/asset_654.mp3","http://video1.smgbb.cn/radio101/%E6%B5%B7%E9%B8%A3%E5%A8%81%26%E6%B3%B3%E5%84%BF-%E4%BD%A0%E7%9A%84%E6%89%BF%E8%AF%BA.mp3 ","http://www.zqzyxx.com/up/2007_04_05/a128105389126093750a.mp3","http://blog.5d.cn/05.mp3","http://mu.baidu.com/upload/experience/jGBwjebwEc0cEwSw.mp3","http://www-rcf.usc.edu/~lanlanwa/music/yszza.mp3","http://www.hdgyxx.com/Files/mp3/胡彦斌/天若有情.mp3","http://wyu73.cn/music/1.mp3","http://bbs.yyjxkj.com/upfile/angel/3sheng3shi/3s3s.mp3","http://baidump3.huaxiayinyuet.cn/1/106528.mp3","http://www.cr100.cn/study/03.mp3","http://www.huangxinxin.com/blog/upload/zaidengyifenzhong.MP3","http://61.156.7.31/upload/upload/50566.mp3","http://www.jlzgyd.com/music/589.mp3","http://www.wasq.net//music/我们的纪念.mp3","http://lqyy.cnlu.net/UploadFile/2008-3/20083180427531.mp3","http://haomusic.newpopyy.cn/1/70825.mp3","http://mp3.chazhan.net/dj/ms/qd/擦肩而过.mp3","http://mp3ge.cnmusicc.com.cn/ik/jlmrkp.mp3","http://52ting.sohomusicbox.cn/3/141754.mp3"];
private var movic:Array=["http://219.138.163.43/divide_part_28/2EFA0C85352B0D48F4526B302A487942716E273E.wmv","http://s7.edmin.cn/s72/5fc26ee903ad2e7f8bcb832bfc1601bd.swf","http://q.yesky.com/uploads/attachments/2009-03/28/ri0bs95r.swf ","http://v2.edmin.cn/c/bc654e530247bbe2a132a746db7292f0.swf","http://v2.edmin.cn/c/bc654e530247bbe2a132a746db7292f0.swf","http://swf.vip.flashyc.com/Upload/2007-10-14/171927906.swf","http://q.yesky.com/uploads/attachments/2009-03/21/416ryy7u.swf","http://swf.vip3.flashyc.com/Upload/swf/nihao/154718894.swf","http://216.86.150.60/videos/0/772854_ea75a.swf","http://yyzq.vip.flashyc.net/upload/谁让我爱上你.swf","http://bbs.lnd.com.cn/UploadFile/2007-12/20071266184560591.swf","http://vip.flash34.com/flashfile//swfs/2009/4/20090401123557_50602.swf","http://s7.edmin.cn/s72/ab4ee47f56cb1004dd2e33844e85b9eb.swf ","http://s7.edmin.cn/s72/f5652e7030d2efa8d18ccb8a05fec0b4.swf"];
private var movic2:Array=["我和草原有个约定","情义无价","其实我很在乎你","故乡的情","为什么相爱的人不能在一起","可怜天下父母心","今宵多珍重","今天你要嫁给我了","谁让我爱上你","手心里的温柔","天路","女儿情","今生难得有情人"];
private var sound:Sound;
private var loading:Loader;
private var soundchannel:SoundChannel;
private var wen:Number;
private var index:uint=0;
private var position1:Number=0;
private var fr1:FileReferenceList;
private var trans:SoundTransform;
private var stopall:SoundMixer;
private var songs:Array=[];
private var s:String;
private var shengyin:SoundMixer;
private var yixuanzhe:Boolean=false;
var fw:Rectangle;
var fw1:Rectangle;
public function bofangqi6() {
trans=new SoundTransform();
var zuo:int=bofangtiao.x;
var shang:int=xiaoqiu.y;
var you:int=bofangtiao.width-xiaoqiu.width;
var xia:int=0;
fw =new Rectangle(zuo,shang,you,xia);
xiaoqiu.buttonMode=true;
var zuo1:int=shengyintiao.x;
var shang1:int=shengyinkuai.y;
var you1:int=shengyintiao.width-shengyinkuai.width;
var xia1:int=0;
fw1=new Rectangle(zuo1,shang1,you1,xia1);
shengyinkuai.buttonMode=true
;
playnext();
for (var j:uint=0; j<liebiao.length; j++) {
gequliebiao.addItem({label:liebiao[j],data:j});
}
gequliebiao.addEventListener(Event.CHANGE,changed);
stage.addEventListener(Event.ENTER_FRAME,wutai);
next1.addEventListener(MouseEvent.CLICK,nextd);
before.addEventListener(MouseEvent.CLICK,befored);
first1.addEventListener(MouseEvent.CLICK,firstd);
mtv.addEventListener(MouseEvent.CLICK,bofang);
stop1.addEventListener(MouseEvent.CLICK,stop1d);
open1.addEventListener(MouseEvent.CLICK,opend);
play1.addEventListener(MouseEvent.CLICK,play1d);
xiaoqiu.addEventListener(MouseEvent.MOUSE_DOWN,hkax);//按下
xiaoqiu.addEventListener(MouseEvent.MOUSE_UP,hksk);//
shengyinkuai.addEventListener(MouseEvent.MOUSE_DOWN,shengyinxia);
shengyinkuai.addEventListener(MouseEvent.MOUSE_UP,shengyinshang);
bendi.visible=false;
mtvmoban.visible=false;
mc.visible=false;
line.visible=false;
per.visible=false;
bendi.addEventListener(Event.CHANGE,changed2);
mtvmoban.addEventListener(Event.CHANGE,xuanzhemtv);
}
function hkax(e:MouseEvent) {
xiaoqiu.startDrag(true,fw);
soundchannel.stop();
}
function hksk(e:MouseEvent) {
xiaoqiu.stopDrag();
position1=xiaoqiu.x*sound.length/480;
soundchannel=sound.play(position1)
;
}
function shengyinxia(e:MouseEvent) {
shengyinkuai.startDrag(false,fw1);
trans.volume=int(shengyinkuai.x)/50;
soundchannel.soundTransform=trans;
}
function shengyinshang(e:MouseEvent) {
shengyinkuai.stopDrag();
}
function changed(e:Event) {
index=e.target.selectedItem.data;
gequming.text=e.target.selectedItem.label
;
stop1d( new MouseEvent(""));
playnext();
}
function playnext() {
if (index>=liebiao.length) {
index=0;
} else if (index<0) {
index=liebiao.length-1;
}
sound=new Sound();
var url:URLRequest=new URLRequest(url1[index]);
var context:SoundLoaderContext=new SoundLoaderContext(8000,true);
sound.load(url,context);
soundchannel=sound.play();
soundchannel.addEventListener(Event.SOUND_COMPLETE,completeover);
}
function completeover(e:Event) {
index++;
playnext();
}
function befored(e:MouseEvent) {
stop1d(new MouseEvent(""));
index--;
playnext();
}
function stop1d(e:MouseEvent) {
position1=soundchannel.position;
soundchannel.stop();
soundchannel=sound.play(0);
soundchannel.stop();
}
function nextd(e:MouseEvent) {
stop1d(new MouseEvent(""));
++index;
playnext();
}
function wutai(e:Event) {
var now:Date=new Date();
huanchong.text=(int(sound.bytesLoaded/sound.bytesTotal*100)+"%");
yibofang.text=timeTo(soundchannel.position);
zongshijian.text=timeTo(sound.length);
shijian.text=date();
var hour=now.getHours();
var minutes=now.getMinutes();
var second=now.getSeconds();
shijian3.text=(String(hour) + ":" + String(minutes) + ":" + String(second));
nihao(hour);
xiaoqiu.x=soundchannel.position/sound.length*480;
drawWave(seleWave.selected);
}
function drawWave(flag:Boolean):void {
var height1:Number=60;
var width1:Number=120;
var bytes:ByteArray=new ByteArray();
SoundMixer.computeSpectrum(bytes,flag,0);
var base=flag?0:-30;
var g:Graphics=this.boxingpu.graphics;
g.clear();
g.moveTo(0,base);
var u:Number=0;
g.beginFill(0x6600cc);
g.lineStyle(0,0x6600cc);
for (var q:uint=0; q<width1; q++) {
u=(bytes.readFloat()*height1);
g.lineTo(q*2,base-u);
}
g.lineTo(width1*2,base);
g.endFill();
g.lineStyle(0,0xcc0066);
g.beginFill(0xcc0066);
g.moveTo(0,60+base);
for (q=0; q<width1; q++) {
u=(bytes.readFloat()*height1);
g.lineTo(q*2,60+base-u);
}
g.lineTo(width1*2,60+base);
g.endFill();
}
function nihao(wen) {
if (wen>=0 && wen <6) {
wenhao.text="夜深了!注意身体";
} else if (wen>=6 && wen<12) {
wenhao.text="朋友!早上好";
} else if (wen>=12 && wen <18) {
wenhao.text="朋友!下午好";
} else if (wen>=18 && wen<24) {
wenhao.text="朋友!晚上好";
}
}
function date() {
var now:Date=new Date();
var day=now.getDay();
var shijian2:Array=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
var b:String=String(shijian2[day]);
return b;
}
function timeTo(n:uint):String {
var hm:uint=n%1000;
var m:uint=n/1000;
var f:uint=m/60;
m=m%60;
return String(100 + f).substr(1,2) + ":" + String(100 + m).substr(1,2) + "." + String(hm);
}
function firstd(e:MouseEvent) {
stop1d(new MouseEvent(""));
soundchannel=sound.play(0);
}
function opend(e:MouseEvent) {
fr1=new FileReferenceList();
fr1.addEventListener(Event.SELECT,selectfiles);
fr1.browse([new FileFilter("MP3文件 (*.mp3)","*.MP3")]);
}
function selectfiles(e:Event) {
bendi.visible=true;
mtvmoban.visible=false;
mc.visible=false;
line.visible=false;
per.visible=false;
for (var i:uint; i<e.target.fileList.length; i++) {
songs.push(e.target.fileList[i].name);
bendi.addItem({label:songs[i],data:i});
}
}
function changed2(e:Event) {
soundchannel.stop();
for (var i:uint=0; i<songs.length; i++) {
if (e.target.selectedItem.data==i) {
var you:String=songs[i];
var url:URLRequest=new URLRequest(you);
sound.load(url);
soundchannel=sound.play();
}
}
}
function play1d(e:MouseEvent) {
stop1d(new MouseEvent(""));
soundchannel=sound.play(position1);
}
function bofang(e:MouseEvent) {
soundchannel.stop();
gequliebiao.visible=false;
bendi.visible=false;
mtvmoban.visible=true;
loading=new Loader();
for (var i:uint=0; i<movic2.length; i++) {
mtvmoban.addItem({label:movic2[i],data:i});
}
}
function xuanzhemtv(e:Event) {
SoundMixer.stopAll()
var weizhi:uint=e.target.selectedItem.data;
s=movic[weizhi];
var url:URLRequest=new URLRequest(s);
mc.visible=true;
line.visible=true;
per.visible=true;
loading.load(url);
loading.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,prothd);
loading.contentLoaderInfo.addEventListener(Event.COMPLETE,completed2);
}
function prothd(e:ProgressEvent) {
per.text=String(int(e.bytesLoaded/e.bytesTotal*100))+"%";
mc.scaleX=e.bytesLoaded/e.bytesTotal
;
}
function completed2(e:Event) {
mc.visible=false;
line.visible=false;
per.visible=false;
loading.x=zhongjian.x;
loading.y=zhongjian.y;
loading.scaleX=0.75;
loading.scaleY=0.6;
var rect:Shape = new Shape();
rect.graphics.beginFill(0xFFFFFF);
rect.graphics.drawRect(zhongjian.x,zhongjian.y, zhongjian.width,zhongjian.height);
addChild(rect);
loading.mask = rect;
addChild(loading);
}
}
下面就是我的代码:
package {
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.net.URLRequest;
import flash.display.Shape;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.display.SimpleButton;
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.net.FileReferenceList;
import flash.events.MouseEvent;
import flash.media.SoundLoaderContext;
import flash.text.TextField;
import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.geom.Rectangle;
import flash.media.SoundTransform;
import flash.utils.ByteArray;
import flash.display.Graphics;
import flash.media.SoundMixer;
import flash.net.FileFilter;
import flash.display.Loader;
public class bofangqi6 extends Sprite {
private var liebiao:Array=["坐火车去拉萨-韩红","你的承诺-海鸣威","水中花-谭咏麟","一场游戏一场梦-王杰","感动天感动地-宇桐","一生中最爱-谭咏麟","天若有情-胡彦斌","诀别诗-胡彦斌","三生三世-陈瑞","愿望-胡彦斌","我的未来不是梦-张雨生","等一分钟-胡彦斌","漫步人生路-邓丽君","想太多-李玖哲","我们的纪念-李雅微","有没有告诉你-陈楚生","突然的自我-伍佰","擦肩而过-宇桐非","没有你我很孤单-刘佳","天使-五月天"];
private var url1:Array=["http://itv.chinatibetnews.com/asset/category3/2008/07/29/asset_654.mp3","http://video1.smgbb.cn/radio101/%E6%B5%B7%E9%B8%A3%E5%A8%81%26%E6%B3%B3%E5%84%BF-%E4%BD%A0%E7%9A%84%E6%89%BF%E8%AF%BA.mp3 ","http://www.zqzyxx.com/up/2007_04_05/a128105389126093750a.mp3","http://blog.5d.cn/05.mp3","http://mu.baidu.com/upload/experience/jGBwjebwEc0cEwSw.mp3","http://www-rcf.usc.edu/~lanlanwa/music/yszza.mp3","http://www.hdgyxx.com/Files/mp3/胡彦斌/天若有情.mp3","http://wyu73.cn/music/1.mp3","http://bbs.yyjxkj.com/upfile/angel/3sheng3shi/3s3s.mp3","http://baidump3.huaxiayinyuet.cn/1/106528.mp3","http://www.cr100.cn/study/03.mp3","http://www.huangxinxin.com/blog/upload/zaidengyifenzhong.MP3","http://61.156.7.31/upload/upload/50566.mp3","http://www.jlzgyd.com/music/589.mp3","http://www.wasq.net//music/我们的纪念.mp3","http://lqyy.cnlu.net/UploadFile/2008-3/20083180427531.mp3","http://haomusic.newpopyy.cn/1/70825.mp3","http://mp3.chazhan.net/dj/ms/qd/擦肩而过.mp3","http://mp3ge.cnmusicc.com.cn/ik/jlmrkp.mp3","http://52ting.sohomusicbox.cn/3/141754.mp3"];
private var movic:Array=["http://219.138.163.43/divide_part_28/2EFA0C85352B0D48F4526B302A487942716E273E.wmv","http://s7.edmin.cn/s72/5fc26ee903ad2e7f8bcb832bfc1601bd.swf","http://q.yesky.com/uploads/attachments/2009-03/28/ri0bs95r.swf ","http://v2.edmin.cn/c/bc654e530247bbe2a132a746db7292f0.swf","http://v2.edmin.cn/c/bc654e530247bbe2a132a746db7292f0.swf","http://swf.vip.flashyc.com/Upload/2007-10-14/171927906.swf","http://q.yesky.com/uploads/attachments/2009-03/21/416ryy7u.swf","http://swf.vip3.flashyc.com/Upload/swf/nihao/154718894.swf","http://216.86.150.60/videos/0/772854_ea75a.swf","http://yyzq.vip.flashyc.net/upload/谁让我爱上你.swf","http://bbs.lnd.com.cn/UploadFile/2007-12/20071266184560591.swf","http://vip.flash34.com/flashfile//swfs/2009/4/20090401123557_50602.swf","http://s7.edmin.cn/s72/ab4ee47f56cb1004dd2e33844e85b9eb.swf ","http://s7.edmin.cn/s72/f5652e7030d2efa8d18ccb8a05fec0b4.swf"];
private var movic2:Array=["我和草原有个约定","情义无价","其实我很在乎你","故乡的情","为什么相爱的人不能在一起","可怜天下父母心","今宵多珍重","今天你要嫁给我了","谁让我爱上你","手心里的温柔","天路","女儿情","今生难得有情人"];
private var sound:Sound;
private var loading:Loader;
private var soundchannel:SoundChannel;
private var wen:Number;
private var index:uint=0;
private var position1:Number=0;
private var fr1:FileReferenceList;
private var trans:SoundTransform;
private var stopall:SoundMixer;
private var songs:Array=[];
private var s:String;
private var shengyin:SoundMixer;
private var yixuanzhe:Boolean=false;
var fw:Rectangle;
var fw1:Rectangle;
public function bofangqi6() {
trans=new SoundTransform();
var zuo:int=bofangtiao.x;
var shang:int=xiaoqiu.y;
var you:int=bofangtiao.width-xiaoqiu.width;
var xia:int=0;
fw =new Rectangle(zuo,shang,you,xia);
xiaoqiu.buttonMode=true;
var zuo1:int=shengyintiao.x;
var shang1:int=shengyinkuai.y;
var you1:int=shengyintiao.width-shengyinkuai.width;
var xia1:int=0;
fw1=new Rectangle(zuo1,shang1,you1,xia1);
shengyinkuai.buttonMode=true
;
playnext();
for (var j:uint=0; j<liebiao.length; j++) {
gequliebiao.addItem({label:liebiao[j],data:j});
}
gequliebiao.addEventListener(Event.CHANGE,changed);
stage.addEventListener(Event.ENTER_FRAME,wutai);
next1.addEventListener(MouseEvent.CLICK,nextd);
before.addEventListener(MouseEvent.CLICK,befored);
first1.addEventListener(MouseEvent.CLICK,firstd);
mtv.addEventListener(MouseEvent.CLICK,bofang);
stop1.addEventListener(MouseEvent.CLICK,stop1d);
open1.addEventListener(MouseEvent.CLICK,opend);
play1.addEventListener(MouseEvent.CLICK,play1d);
xiaoqiu.addEventListener(MouseEvent.MOUSE_DOWN,hkax);//按下
xiaoqiu.addEventListener(MouseEvent.MOUSE_UP,hksk);//
shengyinkuai.addEventListener(MouseEvent.MOUSE_DOWN,shengyinxia);
shengyinkuai.addEventListener(MouseEvent.MOUSE_UP,shengyinshang);
bendi.visible=false;
mtvmoban.visible=false;
mc.visible=false;
line.visible=false;
per.visible=false;
bendi.addEventListener(Event.CHANGE,changed2);
mtvmoban.addEventListener(Event.CHANGE,xuanzhemtv);
}
function hkax(e:MouseEvent) {
xiaoqiu.startDrag(true,fw);
soundchannel.stop();
}
function hksk(e:MouseEvent) {
xiaoqiu.stopDrag();
position1=xiaoqiu.x*sound.length/480;
soundchannel=sound.play(position1)
;
}
function shengyinxia(e:MouseEvent) {
shengyinkuai.startDrag(false,fw1);
trans.volume=int(shengyinkuai.x)/50;
soundchannel.soundTransform=trans;
}
function shengyinshang(e:MouseEvent) {
shengyinkuai.stopDrag();
}
function changed(e:Event) {
index=e.target.selectedItem.data;
gequming.text=e.target.selectedItem.label
;
stop1d( new MouseEvent(""));
playnext();
}
function playnext() {
if (index>=liebiao.length) {
index=0;
} else if (index<0) {
index=liebiao.length-1;
}
sound=new Sound();
var url:URLRequest=new URLRequest(url1[index]);
var context:SoundLoaderContext=new SoundLoaderContext(8000,true);
sound.load(url,context);
soundchannel=sound.play();
soundchannel.addEventListener(Event.SOUND_COMPLETE,completeover);
}
function completeover(e:Event) {
index++;
playnext();
}
function befored(e:MouseEvent) {
stop1d(new MouseEvent(""));
index--;
playnext();
}
function stop1d(e:MouseEvent) {
position1=soundchannel.position;
soundchannel.stop();
soundchannel=sound.play(0);
soundchannel.stop();
}
function nextd(e:MouseEvent) {
stop1d(new MouseEvent(""));
++index;
playnext();
}
function wutai(e:Event) {
var now:Date=new Date();
huanchong.text=(int(sound.bytesLoaded/sound.bytesTotal*100)+"%");
yibofang.text=timeTo(soundchannel.position);
zongshijian.text=timeTo(sound.length);
shijian.text=date();
var hour=now.getHours();
var minutes=now.getMinutes();
var second=now.getSeconds();
shijian3.text=(String(hour) + ":" + String(minutes) + ":" + String(second));
nihao(hour);
xiaoqiu.x=soundchannel.position/sound.length*480;
drawWave(seleWave.selected);
}
function drawWave(flag:Boolean):void {
var height1:Number=60;
var width1:Number=120;
var bytes:ByteArray=new ByteArray();
SoundMixer.computeSpectrum(bytes,flag,0);
var base=flag?0:-30;
var g:Graphics=this.boxingpu.graphics;
g.clear();
g.moveTo(0,base);
var u:Number=0;
g.beginFill(0x6600cc);
g.lineStyle(0,0x6600cc);
for (var q:uint=0; q<width1; q++) {
u=(bytes.readFloat()*height1);
g.lineTo(q*2,base-u);
}
g.lineTo(width1*2,base);
g.endFill();
g.lineStyle(0,0xcc0066);
g.beginFill(0xcc0066);
g.moveTo(0,60+base);
for (q=0; q<width1; q++) {
u=(bytes.readFloat()*height1);
g.lineTo(q*2,60+base-u);
}
g.lineTo(width1*2,60+base);
g.endFill();
}
function nihao(wen) {
if (wen>=0 && wen <6) {
wenhao.text="夜深了!注意身体";
} else if (wen>=6 && wen<12) {
wenhao.text="朋友!早上好";
} else if (wen>=12 && wen <18) {
wenhao.text="朋友!下午好";
} else if (wen>=18 && wen<24) {
wenhao.text="朋友!晚上好";
}
}
function date() {
var now:Date=new Date();
var day=now.getDay();
var shijian2:Array=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
var b:String=String(shijian2[day]);
return b;
}
function timeTo(n:uint):String {
var hm:uint=n%1000;
var m:uint=n/1000;
var f:uint=m/60;
m=m%60;
return String(100 + f).substr(1,2) + ":" + String(100 + m).substr(1,2) + "." + String(hm);
}
function firstd(e:MouseEvent) {
stop1d(new MouseEvent(""));
soundchannel=sound.play(0);
}
function opend(e:MouseEvent) {
fr1=new FileReferenceList();
fr1.addEventListener(Event.SELECT,selectfiles);
fr1.browse([new FileFilter("MP3文件 (*.mp3)","*.MP3")]);
}
function selectfiles(e:Event) {
bendi.visible=true;
mtvmoban.visible=false;
mc.visible=false;
line.visible=false;
per.visible=false;
for (var i:uint; i<e.target.fileList.length; i++) {
songs.push(e.target.fileList[i].name);
bendi.addItem({label:songs[i],data:i});
}
}
function changed2(e:Event) {
soundchannel.stop();
for (var i:uint=0; i<songs.length; i++) {
if (e.target.selectedItem.data==i) {
var you:String=songs[i];
var url:URLRequest=new URLRequest(you);
sound.load(url);
soundchannel=sound.play();
}
}
}
function play1d(e:MouseEvent) {
stop1d(new MouseEvent(""));
soundchannel=sound.play(position1);
}
function bofang(e:MouseEvent) {
soundchannel.stop();
gequliebiao.visible=false;
bendi.visible=false;
mtvmoban.visible=true;
loading=new Loader();
for (var i:uint=0; i<movic2.length; i++) {
mtvmoban.addItem({label:movic2[i],data:i});
}
}
function xuanzhemtv(e:Event) {
SoundMixer.stopAll()
var weizhi:uint=e.target.selectedItem.data;
s=movic[weizhi];
var url:URLRequest=new URLRequest(s);
mc.visible=true;
line.visible=true;
per.visible=true;
loading.load(url);
loading.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,prothd);
loading.contentLoaderInfo.addEventListener(Event.COMPLETE,completed2);
}
function prothd(e:ProgressEvent) {
per.text=String(int(e.bytesLoaded/e.bytesTotal*100))+"%";
mc.scaleX=e.bytesLoaded/e.bytesTotal
;
}
function completed2(e:Event) {
mc.visible=false;
line.visible=false;
per.visible=false;
loading.x=zhongjian.x;
loading.y=zhongjian.y;
loading.scaleX=0.75;
loading.scaleY=0.6;
var rect:Shape = new Shape();
rect.graphics.beginFill(0xFFFFFF);
rect.graphics.drawRect(zhongjian.x,zhongjian.y, zhongjian.width,zhongjian.height);
addChild(rect);
loading.mask = rect;
addChild(loading);
}
}
相关推荐
本期带来的多媒体播放器,可以同时享受听音乐和看视频的乐趣,融合了音乐播放器和网络视频播放器,并且进行完善优化。相对上一版本有以下提升:将资源文件与项目文件独立分开,放在本地Tomcat服务器中进行访问。增加...
在本文中,我们将深入探讨这款播放器的相关知识点,包括Flash技术、AS3语言特性、音乐播放器的设计原理以及如何实现魔兽世界的背景音乐播放。 首先,我们来了解Flash技术。Flash是一种广泛应用于网页动画、交互式...
综上所述,这个压缩包中的迷你Flash音乐播放器是一个结合了传统Flash技术和简单文本播放列表的解决方案,虽然可能面临现代浏览器的兼容性挑战,但它展示了如何在早期互联网时代通过技术实现丰富的用户体验。
jQuery实现的音乐播放器源码是一个基于流行的JavaScript库jQuery构建的音乐播放应用程序。这个项目旨在为网站提供一个功能丰富的、用户友好的音频播放解决方案。在本文中,我们将深入探讨jQuery音乐播放器的核心特点...
总的来说,MP3跨域音频频谱AS3播放器是Web开发中的一个创新工具,它利用AS3的强大功能,结合频谱分析,为用户提供了既美观又实用的音乐播放体验。开发者可以通过深入研究其源代码,学习如何处理跨域音频和实现动态...
AS3.0(ActionScript 3.0)是Adobe Flash平台上的编程语言,主要用于创建交互式内容、动画和网络应用程序,包括视频播放器。在AS3.0中,播放器的源码通常涉及到多个组件和类,每个都有特定的功能,以实现完整的媒体...
【基于安卓开发的音乐播放器主类详解】 在Android平台上,开发一款音乐播放器涉及到多媒体处理、用户界面交互以及线程同步等多个方面的技术。这里我们分析的`PlayerActivity`是这个音乐播放器的核心类,主要功能...
【标题】: "一个简易安卓音乐播放器" 涉及到的知识点: 在安卓(Android)平台上开发一个简易的音乐播放器,通常会涵盖以下几个关键技术和知识点: 1. **Android Studio (AS)**:Android Studio是Google提供的官方...
【C# WinForm音乐播放器】是一个基于C#编程语言的桌面应用程序,它利用Windows Media Player控件实现音频和视频的播放功能。这个项目对于学习C#基础以及WinForm应用开发的初学者来说是一个很好的实践案例。下面我们...
### 使用VC++与Java设计音乐播放器:详细教程与实现要点 #### 一、项目概述与目标 在本教程中,我们将详细介绍如何使用VC++设计一个功能全面且易于使用的音乐播放器。此外,我们还将简要探讨使用Java进行类似开发...
AVPlayer还有其他高级功能,比如支持播放远程URL、处理播放错误、实现视频播放等。同时,AVPlayerLayer可以将AVPlayer的视频内容渲染到CALayer上,这对于音乐APP中同时展示歌词或专辑封面很有用。 总结一下,"iOS...
标题中的"audioplayer音乐播放器"是一款专门用于播放音频文件的应用程序,它支持多种音频格式,包括MP3、MPGA、WAV、MIDI、AU、WMA、ASF、WPL、ASX、WMX、WAX以及M3U。这些格式涵盖了常见的数字音频文件类型,使得该...
在本例中,我们关注的是一个基于Flash和XML的MP3播放器,它使用ActionScript 2.0(AS2.0)编程语言进行开发。以下是关于这个主题的详细知识点: 1. **Flash**: Flash是一种多媒体创作工具,主要用于制作动画、交互...
功能:使用Windows Media Player播放音乐,视频,支持 WAV、MID、MP3、MPG、AVI、ASF、WMV、RM、RMVB等文件。 技术:C# + WinForm 版本:Microsoft Visual Studio 2008 上开发 实现功能: 1.选择文件播放 2.设置...
【形象壹佰音乐播放器 FLASH版】是一款专为MP3音频格式设计的在线播放器,其特点是能够实现不间断的音乐播放,并且无需后台程序支持,用户可以无限制地存储和播放喜爱的MP3歌曲。这款播放器基于Adobe Flash技术开发...
视频播放器需要支持多种多媒体格式,包括CD音乐曲目(.cda),数字波形声音(.WAV),MIDI文件(.mid, .rmi, .midi),Windows Media文件(.asf, .wm, .wma),电影文件(.mpeg, .mpg, .mp3),视频文件(.avi, .wmv...
ASF是一种广泛用于流媒体的容器格式,能包含音频、视频和其他数据,虽然MP3不是ASF格式,但播放器可能需要处理包含MP3的ASF文件。 musicInfo.bas可能包含音乐信息的解析,比如ID3标签,这些信息包括歌曲标题、艺术...