Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flash embedded in HTML doesn't appear in Chrome

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?

like image 478
peroxide Avatar asked Nov 08 '10 13:11

peroxide


People also ask

Can you still enable Flash on Chrome?

As of 2021, Adobe has ended support for the Flash Player plugin. Flash content, including audio and video, will no longer play back in any version of Chrome. Visit the Chrome blog to learn more.

Why can t I use Flash Player on Chrome?

If you're experiencing the Flash not working issue in Chrome, you should first make sure Flash Player is enabled in your browser. To do so: 1) Go to Chrome Settings > Advanced > Content settings.


4 Answers

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>
like image 167
Jose De Gouveia Avatar answered Sep 22 '22 20:09

Jose De Gouveia


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>
like image 41
KBoek Avatar answered Sep 26 '22 20:09

KBoek


Why don't you try proper

width="600" height="1300" 

instead of

width="600px" height="1300px" 

(which is not in HTML standard)?

like image 40
pamelus Avatar answered Sep 22 '22 20:09

pamelus


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>
like image 35
hostinginca Avatar answered Sep 23 '22 20:09

hostinginca