Iäm using swf object to embed a swf on my web page. Same swf is shown on 5-6 links on my web page but every time it takes same time to load the swf, any idea?
开发者_如何学GoHere is the code
var href = 'http://xyz.com/dialog/demo.swf';
var flashvars = {};
var params = {};
params.wmode = "transparent";
params.allowscriptaccess = "always";
params.swliveconnect = "true";
params.menu = "false";
var attributes = {};
attributes.id = "c2c";
attributes.name = "c2c";
swfobject.embedSWF(href+"?nocache="+siteID+"&phone="+num+"&siteid="+siteID, "infBox", "100", "60", "9.0.0", "http://xyz.com/dialog/expressInstall.swf", flashvars, params, attributes);
In the following line in your code. You are explicitly letting swfobject not to cache your movie.
swfobject.embedSWF(href+"?nocache="+siteID+"&phone="+num+"&siteid="+siteID, "infBox", "100", "60", "9.0.0", "http://xyz.com/dialog/expressInstall.swf", flashvars, params, attributes);
You need to remove or update the nocache variable. In your code is not specified but I'm sure that the var "num" is being randomized somewhere in your code.
suggestion 1 - remove no cache completely:
swfobject.embedSWF(href, "infBox", "100", "60", "9.0.0", "http://xyz.com/dialog/expressInstall.swf", flashvars, params, attributes);
solution 2 - only remove the num variable from the swf address query
swfobject.embedSWF(href+"?nocache="+siteID+"&phone="+"&siteid="+siteID, "infBox", "100", "60", "9.0.0", "http://xyz.com/dialog/expressInstall.swf", flashvars, params, attributes);
Try this type of code
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="502" height="250">
<param name="movie" value="swffile.swf" />
<param name="quality" value="high" />
<embed src="swffile.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="502" height="250"></embed>
</object>
you may get this if you are using dreamweaver as your editor in the menu insert->media->flash
精彩评论