Flash embedded in HTML doesn't appear in Chrome
Solution 1
i know is an old post , but i ran to this problem too and i found a solution, when you embed a video in worpress, use just the "embed" tag, because it seems that google chrome when its read the "object" tag, skips the tags inside ,
OLD CODE
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="600" height="1300"><param name="src" value="flash.swf" /><param name="wmode" value="transparent" /><embed type="application/x-shockwave-flash" width="600px" height="1300px" src="flash.swf" wmode="transparent"></embed></object>
NEW CODE
<embed type="application/x-shockwave-flash" width="600px" height="1300px" src="flash.swf" wmode="transparent"></embed>
Also as suggested by @joshuahedlund and probably the right answer , just adding the type seems to fix the issue
<object type="application/x-shockwave-flash" ... > ... </object>
Solution 2
I've used this javascript code snippet for a while and it seems to work find in most browsers. You'll need the AC_RunActiveContent.js for this, download it from http://www.adobe.com/devnet/activecontent/articles/devletter.html
<script type="text/javascript">
AC_FL_RunContent(
'id', 'mediaPlayer',
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '480',
'height', '360',
'src', 'myFlashMovie.swf',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'bgcolor', '#000000',
'name', 'mediaPlayer',
'menu', 'true',
'allowFullScreen', 'true',
'allowScriptAccess', 'sameDomain',
'movie', 'myFlashMovie.swf',
'salign', '');</script>
Solution 3
Why don't you try proper
width="600" height="1300"
instead of
width="600px" height="1300px"
(which is not in HTML standard)?
Solution 4
This code work in all browsers (iexplore, firefox, chrome,..), You can try http://civiro.com
<object type="application/x-shockwave-flash"
width="740" height="470" data="civiro.swf">
<param name="movie" value="civiro.swf">
</object>
Related videos on Youtube
peroxide
Updated on September 04, 2020Comments
-
peroxide over 3 years
When i embed a flash video in HTML it works in IE and in Firefox but not in chrome. I've looked it up and I've found that chrome adds two attributes to the embed tag, width and height. i have already set the width and height attribute in the embed tag in pixels but from some reason chrome changes it to percentage. when i inspect the element and write pixels instead of percentage the flash is visible again.
This is the embed
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="600" height="1300"> <param name="src" value="flash.swf" /> <param name="wmode" value="transparent" /> <embed type="application/x-shockwave-flash" width="600px" height="1300px" src="flash.swf" wmode="transparent"> </embed> </object>
How can i fix it?
-
peroxide over 13 yearsthanks for the solution but is there another solution without js, i have lots of js already in my system and it slows my pages.
-
KBoek over 11 years