Debabratta Jena
Debabratta Jena

Reputation: 431

How to Include a flash object into a xhtml page

I am trying to create a project in which I want to include a falsh object.I have the .swf file named as movie.swf.
Now in my xhtml page I write this code

<div id="movie">
  here i want flash content
</div>

where the flash content should be written,
and my script is

<script type="text/javascript">
   var so = new SWFObject("movie.swf", "movie", "400", "200", "8", "#336699");
   so.write("movie");
</script>

but this is not working.
Please find the error for the code or is there anything else I have to write.
Thankyou.

Upvotes: 1

Views: 131

Answers (1)

brandon.l
brandon.l

Reputation: 58

Have you included the following in your <head></head>?

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>

You'll need to allow for your SWFObject to have access to swfobject.js file either via that Google AJAX Libraries API or locally. Here's further documentation:

How to embed Flash Player content using SWFObject dynamic publishing

Upvotes: 1

Related Questions