标签:http io 数据 ar new amp 数据库 type
protected void Page_Load(object sender, EventArgs e) { //这个你可以直接指定路径,当然可以接收从另外一页传过来的参数,再有一个就是从数据库取出来啦。 string file = ResolveUrl("~/Flv/歌曲:王菲《传奇》.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:自动播放|0:连续播放|100:默认音量|0:控制栏位置|2:控制栏显示|0x000033:主体颜色|60:主体透明度|0x66ff00:光晕颜色|0xffffff:图标颜色|0xffffff:文字颜色|:logo文字|:logo地址|:结束swf地址"; //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://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0‘ width=" + _Width + " height=" + _Height + ">" + @" <param name=‘movie‘ 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>"; } }
标签:http io 数据 ar new amp 数据库 type
原文地址:http://www.cnblogs.com/huweijun/p/3880999.html