﻿/// <summary>
/// flash视频播放器构造
/// </summary>
/// <author>党杰</author>
/// swf:             swf文件位置
/// DivID:           控件ID
/// width:           宽度
/// height:          高度
/// movieName:       要播放的视频位置

function SWFObject(swf,DivID,width,height,banben,aa,bb,movieName)
{
   this.MovieName = movieName;
   this.SwfPach = swf;
   this.VideoDiv = document.getElementById(DivID);
   this.FlashSrc = this.SwfPach + "?movieName=" + this.MovieName +  "";
   this.Width = width;
   this.Height = height;
}

//初始化
SWFObject.prototype.InitVideo = function()
{
    this.VideoDiv.style.width = this.Width;
    this.VideoDiv.style.height = this.Height;
    this.VideoDiv.innerHTML = "<embed id='" + this.VideoDiv.id + "EMBED' src='" + this.FlashSrc + "'   allowFullScreen='true' allowSciptAccess='always' style='height: " + this.Height + "; width: " + this.Width + ";' />";
}

//获取共享HTML
SWFObject.prototype.GetShareHTML = function()
{
    return "<embed id='" + this.VideoDiv.id + "EMBED' src='" + this.FlashSrc + "'   allowFullScreen='true' allowSciptAccess='always' style='height: " + this.Height + "; width:" + this.Width + ";' />";
}
//获取共享flash
SWFObject.prototype.GetShareFlash = function()
{
    return this.FlashSrc;
}