I’ve find some way to embed swf into html page… Here is code…
<object id="swfobj" style="display:none; margin-right: 385px;" classid="clsid:D27CDB6E- AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
width="309" height="200">
<param name="movie">
<param name="quality" value="high">
<embed style="margin-left: 18px;border:1px solid #999999;" quality="high" width="309" height="200" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
Then in JavaScript part I have this
function openfile(filePath) {
$("#swfobj > EMBED").attr("src", filePath);
$("#swfobj").fadeIn("slow");
};
Now I’ve two problems
1.This code works in Firefox, but is crashed in Chrome… It works only when I clicked at first element and then it stop working… How to make this cross-browser?
2.I want to open swf in a new tab of my browser… How can i do it?
in your function add:
This will open a new window (myflash.html, you must create it) that contains the html of
objectwith id#swfobj.Keep in mind that you must make the
#swfobjvisible in the new window. So addin the myflash.html (
!importantis needed to override the inlinedisplay:noneof#swfobjThe above works in firefox and chrome but you have to enable the popup.