RSS订阅优然探索
你的位置:首页 » 技术笔记 » 正文

Flash加载外部图片,如何使用JavaScript传递信息到Swf

选择字号: 超大 标准 发布时间:2008-9-10 20:54:49 | 作者:admin | 0个评论 | 人浏览

function goinfo(myflash)

{

   var MeDshow, MeDsrc;

   var MeIshow, MeIw, MeIh, MeIsrc;

   var MeFshow, MeFinfo, MeFtype, MeFsize, MeFcolor, MeFspacing;

   var MeFb, MeFu, MeFi;

   var MeFalign, MeFvalign, MeFlrange, MeFtrange;

   var parainfo;

   var MeIa,MeIv;

   var mh, mw, flash;

   MeIshow = myflash[0];

   MeIw = myflash[1];

MeIh = myflash[2];

   MeIsrc = myflash[3];

   MeIstyle = myflash[4];

   MeFshow = myflash[5];

   MeFinfo = myflash[6];

   MeFurl = myflash[7];

   MeFurlshow = myflash[8];

   MeFtype = myflash[9];

   MeFsize = myflash[10];

   MeFcolor = myflash[11];

   MeFspacing = myflash[12];

   MeFb = myflash[13];

   MeFu = myflash[14];

   MeFi = myflash[15];

   MeFalign = myflash[16];

   MeFvalign = myflash[17];

   MeFlrange = myflash[18];

   MeFtrange = myflash[19];

   MeFstyle = myflash[20];

   MeDshow = myflash[21];

   MeDsrc = myflash[22];

   MeIa = myflash[23];

   MeIv = myflash[24];

   mh = MeIh;

   mw = MeIw;

   flash = "/Lib/FlashLBC/Flash" + MeIstyle + MeFstyle + ".swf";

   parainfo = "MeDshow=" + MeDshow + "&MeDsrc=" + MeDsrc

   parainfo = parainfo + "&MeIshow=" + MeIshow + "&MeIw=" + MeIw + "&MeIh=" + MeIh + "&MeIsrc=" + MeIsrc

   parainfo = parainfo + "&MeFurlshow=" + MeFurlshow + "&MeFurl=" + MeFurl

   parainfo = parainfo + "&MeFshow=" + MeFshow + "&MeFinfo=" + MeFinfo + "&MeFtype=" + MeFtype + "&MeFsize=" + MeFsize

   parainfo = parainfo + "&MeFcolor=" + MeFcolor + "&MeFspacing=" + MeFspacing + "&MeFb=" + MeFb + "&MeFu=" + MeFu + "&MeFi=" + MeFi

   parainfo = parainfo + "&MeFalign=" + MeFalign + "&MeFvalign=" + MeFvalign + "&MeFlrange=" + MeFlrange + "&MeFtrange=" + MeFtrange

   parainfo = parainfo + "&MeIa=" + MeIa + "&MeIv=" + MeIv

   me2008jsflash(flash, parainfo, mw, mh);

//alert(parainfo)

}

function me2008jsflash(flash, parainfo, mw, mh)

{

   var flashinfo;

   flashinfo = ('<div style="width:'+mw+'; height:'+mh+';"><div align="center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+ mw +'" height="'+ mh +'" id="myFlash">');

   flashinfo += ('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+flash+'"><param name="quality" value="high"><param name="wmode" value="transparent">');

   //flashinfo += ('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+flash+'"><param name="quality" value="high">');

   flashinfo += ('<param name=wmode value="opaque">');

   flashinfo += ('<param name="FlashVars" value="'+parainfo+'">');

   flashinfo += ('<embed name="myFlash" src="'+flash+'" wmode="opaque" FlashVars="'+parainfo+'" menu="false" bgcolor="#DADADA" quality="high" width="'+ mw +'" height="'+ mh +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');

   flashinfo += ('</object></div></div>');

    document.write(flashinfo);

   //window.alert(flashinfo)

}

function me2008jsflashreturn(flash, parainfo, mw, mh)

{

   var flashinfo;

   flashinfo = ('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+ mw +'" height="'+ mh +'" id="myFlash">');

   //flashinfo += ('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+flash+'"><param name=wmode value=transparent><param name="quality" value="high">');

   flashinfo += ('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+flash+'"><param name="quality" value="high">');

   flashinfo += ('<param name=wmode value="opaque">');

   flashinfo += ('<param name="FlashVars" value="'+parainfo+'">');

   flashinfo += ('<embed name="myFlash" src="'+flash+'" wmode="opaque" FlashVars="'+parainfo+'" menu="false" bgcolor="#DADADA" quality="high" width="'+ mw +'" height="'+ mh +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');

   flashinfo += ('</object>');

   return flashinfo;

}

function showzinfo()

{

    var mflash = new Array("0","778","152","/正式开始/1/1.jpg","01","0","1倍建站速度×1倍建站速度×1倍建站速度=1倍建站速度","http://www.mewww.net","1","黑体","25","0xFFFFFF","8","0","1","1","1","1","0","0","01","0","/正式开始/1/1.swf");

    goinfo(mflash);

}

//showzinfo();
 

标签:Flash  

发表评论

必填

选填

选填

必填,不填不让过哦,嘻嘻。

记住我,下次回复时不用重新输入个人信息

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。