JPJedi
JPJedi

Reputation: 1508

.swf will play in IE but not Chrome

I have a asp.net 3.5 page that shows a file with a .swf extension. In IE when the page is pulled up the flash file is played and all looks normal. When I look at it in Google Chrome their is just a white space where the file should be playing. Is their a way to make the file play when viewing in chrome?

Here is the code:

<object width="400" height="250">
        <param name="movie" value="abc.swf">
        <embed src="../StaticPages/abc.swf" width="400" height="250" />         
   </object>

Upvotes: 1

Views: 3478

Answers (4)

Martin Mollusk
Martin Mollusk

Reputation: 31

IE 7-9 will play as long as the param value is a valid path; but Chrome and other compliant browsers require both param and embed paths to be correct.

Upvotes: 3

JPJedi
JPJedi

Reputation: 1508

The page that is showing the flash file is being loaded by a text file that has the text for the page and the tags in it to run the flash file.

Once I looked at the tags more I see where the issue was. the src and value path were not the same so chrome could not locate the file. When I updated the file locations to match it worked.

Thanks

Original Code

<object width="400" height="250">
    <param name="movie" value="abc.swf">
    <embed src="../StaticPages/abc.swf" width="400" height="250" />         

Fixed/correct Code:

<object width="400" height="250">
    <param name="movie" value="/StaticPages/abc.swf">
    <embed src="/StaticPages/abc.swf" width="400" height="250" />         

Upvotes: 2

Dennis Jaamann
Dennis Jaamann

Reputation: 3565

This is most likely to be related to way you embed your swf into your page. Especially if it also occurs in other browsers like firefox.

You can use SWFObject for this. It is an open source javascript library that handles embedding swfs in all different browsers.

More information on why this occurs: http://livedocs.adobe.com/flex/3/html/help.html?content=wrapper_13.html

Or if you want a more fancy way to display video content on a browser, try

http://flowplayer.org/demos/installation/index.html

and

http://www.longtailvideo.com/players/jw-flv-player/

Upvotes: 1

Seneca
Seneca

Reputation: 212

Could you provide the actual tags / javascript you are using to place the flash file in the page?
Have you tried opening the swf file by itself in chrome to make sure it is not just a tag issue?
As DennisJaamann points out, at least as far as firefox, there are issues with tags. Firefox won't play swfs using just the object tag without specifying the proper type. The problem of the difference in browsers is such that if you poke at the Adobe site itself, you'll see they use a public library for embedding swfs on their own site.

Upvotes: 0

Related Questions