Protected void page_load (Object sender, eventargs e) {// you can specify the path directly. Of course, you can receive parameters from another page, the other one is getting it from the database. String file = resolveurl ("~ /FLV/Song: Faye Wong legend. FLV ");
FLV objflv = new FLV (800,600, file); this. literal1.text = objflv. Player ();}
Public class FLV {private string _ file; private int _ width; private int _ height;
Public int width {set {_ width = value ;}}
Public int height {set {_ Height = value ;}}
Public String file {set {_ file = value ;}}
Public FLV () {// todo: Add constructor logic here //}
Public FLV (INT width, int height, string file) {This. _ width = width; this. _ Height = height; this. _ file = file ;}
Public string player () {string texts = string. empty; string Config = "0: automatic playback | 0: continuous playback | 100: Default volume | 0: control bar position | 2: control bar display | 0x000033: subject color | 60: Subject transparency | 0x66ff00: Halo color | 0 xffffff: icon color | 0 xffffff: text color |: logo text |: logo address |: End SWF address "; // string swffile = httpcontext. current. request. applicationpath + "/FLV/vcastr22.swf"; string swffile = "/FLV/vcastr22.swf"; return @ "<object classid = 'clsid: d27cdb6e-ae6d-11cf-96b8-444553540000 'codebase = 'HTTP: // adjust width = "+ _ width +" Height = "+ _ height +"> "+ @" <Param name = 'movi' value = "+ swffile +">" + @ "<Param name = 'quality' value = 'high'>" + @ "<Param name = 'menu 'value = 'false'>" // + @ "< param name = 'isautoplay' value = '1'> "autoplay =" true "+ @" <Param name = 'autoplay' value = 'true'> "+ @" <Param name = 'wmode' value = 'opaque'> "+ @" <Param name = 'allowfullscreen 'value = 'true'> "+ @" <Param name = 'flashvars' Value = 'vcastr _ file = "+ _ file +" & vcastr_title = "+ texts +" & vcastr_config = "+ config +" '> "+ @" <embed src = "+ swffile + "wmode = 'opaque 'flashvars = 'vcastr _ file =" + _ file + "& vcastr_title =" + texts + "& vcastr_config =" + config + "'menu = 'false' Quality = 'high' width = "+ _ width +" Height = "+ _ height +" type = 'application/X-Shockwave-flash' pluginspage = 'HTTP: // www.macromedia.com/go/getflashplayer'/> "+ @" </Object> ";}}