<%@ Webservice Language="C#" class="mp3Service" %> using System; using System.Collections; using System.Web.Services; using System.IO; public class mp3Service : System.Web.Services.WebService { public mp3Service() { } [WebMethod] public ArrayList GetMp3() { ArrayList mp3List =new ArrayList(); string mp3path = Server.MapPath("mp3"); try { DirectoryInfo di = new DirectoryInfo(mp3path); FileInfo[] fi = di.GetFiles(); foreach (FileInfo fiTemp in fi) { if(fiTemp.Extension.ToLower() == ".mp3"||fiTemp.Extension.ToLower() == ".wma") { mp3List.Add(fiTemp.Name); } } } catch (Exception e) { Console.WriteLine("The process failed: {0}", e.ToString()); } return mp3List; } } |
on (click) { // Trigger Data Source Behavior // Macromedia 2003 this._parent.mp3serivice.trigger(); } |
on (change) { //Load Streaming mp3 behavior if(_global.Behaviors == null)_global.Behaviors = {}; if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {}; if(typeof this.createEmptyMovieClip == ’undefined’){ this._parent.createEmptyMovieClip(’BS_mp3’,new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) ); _global.Behaviors.Sound.mp3 = new Sound(this._parent.BS_mp3); } else { this.createEmptyMovieClip(’_mp3_’,new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) ); _global.Behaviors.Sound.mp3 = new Sound(this.BS_mp3); } _global.Behaviors.Sound.mp3.loadSound("http://onlytiancai/bak/flashmp3/mp3/"+this.selectedItem,true); } |
Word教程网 | Excel教程网 | Dreamweaver教程网 | Fireworks教程网 | PPT教程网 | FLASH教程网 | PS教程网 |
HTML教程网 | DIV CSS教程网 | FLASH AS教程网 | ACCESS教程网 | SQL SERVER教程网 | C语言教程网 | JAVASCRIPT教程网 |
ASP教程网 | ASP.NET教程网 | CorelDraw教程网 |