发新帖  新投票  回帖 
2338个阅读者,0条回复 | 打印 | 订阅 | 收藏
pengqiaoyan

发表时间:2011-8-21 17:29

AS3.0立体声音乐播放器[原创]



pengqiaoyan 发表在 音乐播放器 华声论坛 http://bbs.voc.com.cn/forum-344-1.html

[全屏欣赏]


源代码:

var SelectedObj={};
SelectedObj.down=false;
SelectedObj.selecte=null;
SelectedObj.selecteBool=false;
SelectedObj.inx=0;
SelectedObj.DoubleClick=0;
SelectedObj.Next=true;
edit_tool.Member_ID=lister.imd;
var aList:List = new List();
var sinkList:List = new List();
sink.close_btn.addEventListener(MouseEvent.CLICK,close_fco);
sink.min_btn.addEventListener(MouseEvent.CLICK,min_fco);
sink.close_btn.addEventListener(MouseEvent.MOUSE_OVER, over_fco);
sink.min_btn.addEventListener(MouseEvent.MOUSE_OVER, over_fco);
function over_fco(event:MouseEvent):void {
load_obj.MoveBool=false;
}

function close_fco(event:Event) {

}
function min_fco(event:Event) {

}
var list_member_arr=[edit_tool,delete_tool,barTool,delete_btn,add_btn,edit_btn,barTool2,aList];
var sink_member_arr=[sinktool1,sinktool2,sinkList];
sink.mc.list_member_arr=list_member_arr;
sink.mc.sink_member_arr=sink_member_arr;
for (var t=0; t list_member_arr[t].visible=false;
}
for (var t_=0; t_ sink_member_arr[t_].visible=false;
}
var member:Array=[];
var load_obj:Loader_Img=new Loader_Img("/);
//var load_obj2:Loader_Img=new Loader_Img("sink1.swf",mc,soundList);
//var lcSender:LCSender=new LCSender(load_obj);

var sink_arr=[["黑色经典","/"]];
sinkList.setSize(129, 110);
aList.setSize(200, 210);
var format:TextFormat = new TextFormat();
format.color = 0xffffff;
format.size = 12;
aList.setRendererStyle("textFormat", format);
sinkList.setRendererStyle("textFormat", format);
aList.rowCount=10;
sinkList.rowCount=5;
//////////////////////////////////
for (var i_=0; i_
sinkList.addItem({label:(i_+1)+'.'+sink_arr[i_][0], data:sink_arr[i_][1]});
}
for (var i=0; i var str=(i+1)+"."+soundList.label.substr(0,15);
if (soundList.length>15) {
str+="......";
}
if (i==0) {

SelectedObj.id={label:str,data:soundList.link,info:soundList.info,id:i};
}
aList.addItem({label:str, data:soundList.link,info:soundList.info,id:i});
}





//aList.move(10,100);

addChild(aList);
addChild(sinkList);

aList.addEventListener(fl.events.ListEvent.ITEM_ROLL_OVER,Cover);
aList.addEventListener(fl.events.ListEvent.ITEM_ROLL_OUT,Cout);
aList.addEventListener(MouseEvent.MOUSE_DOWN,GetMouseDown_Func);
aList.addEventListener(MouseEvent.MOUSE_UP,GetMouseUp_Func);
sinkList.addEventListener(ListEvent.ITEM_CLICK , down);
function down(e:ListEvent) {
var list:List = e.target as List;
var item:Object = e.item;
load_obj.ChangSink(item.data);

}
function GetMouseDown_Func(event:Event) {
SelectedObj.down=true;
SelectedObj.id=SelectedObj.Tmp;


}
function GetMouseUp_Func(event:Event) {

SelectedObj.DoubleClick++;
var timer:Timer=new Timer (200);
timer.addEventListener("timer",lis);
timer.start();
if (SelectedObj.DoubleClick==2) {
SelectedObj.DoubleClick=0;
var list_arr=[];
for (var i=0; i list_arr.push(aList.getItemAt(i).data);
}
load_obj.PlaySelected(SelectedObj.inx,list_arr);

} else if (SelectedObj.Change) {
var SaveSoundList="<FileList>";
aList.removeItem(SelectedObj.id);

aList.addItemAt(SelectedObj.id,SelectedObj.selecte);
for (var j=0; j var str=aList.getItemAt(j).label;
var newStr=str.substr(str.indexOf("."),str.length);
str=aList.getItemAt(j).label=(j+1)+newStr;
SaveSoundList+=aList.getItemAt(j).info;
}
SaveSoundList+="</FileList>";
//trace(SaveSoundList)
savePlayList(SaveSoundList);

}
SelectedObj.Change=false;
//SelectedObj.id=null;

}


function Cout(e:ListEvent):void {
var list:List = e.target as List;
var item:Object = e.item;

}

function Cover(e:ListEvent):void {
var list:List = e.target as List;
var item:Object = e.item;
SelectedObj.Tmp= item;
if (SelectedObj.down) {

SelectedObj.Change=true;
} else {
SelectedObj.Change=false;
}
var cr:CellRenderer = e.target.itemToCellRenderer(e.item) as CellRenderer;
var listData:ListData = cr.listData;
SelectedObj.selecte=listData.row;
SelectedObj.inx=listData.row;
}

////////////////////////////////////////////


function lis(event:TimerEvent) {

SelectedObj.DoubleClick=0;
event.target.stop();
}


aList.move(barTool.x-1,barTool.y+barTool.height-1);
sinkList.move(aList.x+200,aList.y);
sinktool1.x=sinktool2.x=sinkList.x;
sinktool1.y=sinkList.y+1-sinktool1.height;
sinktool2.y=sinkList.y+sinkList.height;
edit_tool.y=delete_tool.y=sinktool2.y+sinktool2.height;
edit_tool.x=delete_tool.x=sinktool2.x;
barTool2.x=barTool.x;

barTool2.y=aList.y+aList.height;

add_btn.y=delete_btn.y=edit_btn.y=aList.y+aList.height+(barTool2.height-add_btn.height)/2;
barTool.members=[edit_tool,delete_tool,barTool,delete_btn,add_btn,edit_btn,barTool2,aList];
sinktool1.members=[sinktool1,sinktool2,sinkList];
sinktool1.close_btn.addEventListener(MouseEvent.CLICK,closeFunc);
barTool.close_btn.addEventListener(MouseEvent.CLICK,closeFunc);
//mc.list_btn.addEventListener(MouseEvent.CLICK,showFunc);
//mc.sink_btn.addEventListener(MouseEvent.CLICK,showFunc);
add_btn.addEventListener(MouseEvent.CLICK,addFunc);
delete_btn.addEventListener(MouseEvent.CLICK,deleteFunc);
edit_btn.addEventListener(MouseEvent.CLICK,editFunc);


private function unLoadHandler(event:Event):void {
//trace("unLoadHandler: " + event);
}*/
}
}

 
发新帖 新投票
 回帖
查看积分策略说明快速回复主题
你的用户名: 密码:   免费注册(只要30秒)


启用 Html 代码
使用个人签名
(请您文明上网理性发言!并遵守相关规定贴文发布前,请确认贴文内容完全由您个人创作或您得到了版权所有者的授权。版权声明
   



Processed in 0.013903 s, 8 q - sitemap,