JS代码
// 
function FocusB1()
{
}
//flash的路径
FocusB1.prototype.Path="focus_B1.swf";
//flash中图片的宽高
FocusB1.prototype.ImgWidth=200;
FocusB1.prototype.ImgHeight=300;
//文字区域的宽高
FocusB1.prototype.TxtHeight=100;
//字体的背景色
FocusB1.prototype.TxtBackColor=0xffffff;
//字体背景透明度
FocusB1.prototype.TxtBackAlpha=60;
//标题文字颜色
FocusB1.prototype.TitleColor=0x00ff00;
FocusB1.prototype.TitleBackColor=0xffffff;
//简介文字的大小
FocusB1.prototype.TxtFontSize=14;
//简介文字字体颜色
FocusB1.prototype.TxtFontColor=0x999999;//图片切换间隔帧数,单位为秒
FocusB1.prototype.ReturnNum = 15;
//图片地址
FocusB1.prototype.Pics="";
//新闻链接地址
FocusB1.prototype.Urls="";
//标题
FocusB1.prototype.Titles="";
//内容简介
FocusB1.prototype.Intros="";
//
//输出flash
FocusB1.prototype.write=function()
{
var sceneWidth=this.ImgWidth+this.Pics.split("|").length*25-3; var str="<embed flashvars=\"imgWidth="+this.ImgWidth+"&imgHeight="+this.ImgHeight+
"&txtBackColor="+this.TxtBackColor+"&txtBackAlpha="+this.TxtBackAlpha+
"&titleColor="+this.TitleColor+"&titleBackColor="+this.TitleBackColor+
  "&txtHeight="+this.TxtHeight+"&txtFontSize="+this.TxtFontSize+"&txtFontColor="+this.TxtFontColor+
  "&pics="+this.Pics+"&titles="+this.Titles+"&intros="+this.Intros+
  "&urls="+this.Urls+"&returnNum="+this.ReturnNum+"\" "+
  "wmode=\"transparent\" "+
  "src=\""+this.Path+"\" quality=\"high\" width=\""+sceneWidth+"\" height=\""+(this.ImgHeight+this.TxtHeight)+"\" name=\"FocusB1\"  id=\"FocusB1\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
//alert(str)
document.write(str);
}
HTML代码
<script language="JavaScript" type="text/javascript">
var fo=new FocusB1()
fo.ImgWidth=250;
fo.ImgHeight=150;
fo.Pics="img/1.jpg|img/2.jpg|img/3.jpg|img/4.jpg";
fo.Urls="img/1.jpg|img/2.jpg|img/3.jpg|img/4.jpg";
fo.Titles="Flash图片轮换-效果A1|参数设置|浏览器兼容性|为您订制开发";
fo.TitleBackColor=0x990000;
fo.TitleColor=0xffffff;
fo.Intros="文字1|文字2|文字3|文字4";
fo.TxtHeight=150;
fo.TxtBackColor=0xeeeeee;
fo.TxtFontColor=0x990000;
fo.TxtFontSize=13;
fo.ReturnNum = 15;
//输出
fo.write();
</script>效果:
flash效果:http://www.care-e.net/5/index.html问题:我如何控制文字的位置?我想让文字在flash的左侧。如何实现??