tags:

views:

182

answers:

3

i'm planning to use a .swf file as a header. this won't work.

<img src="exactheader.swf" width="650" height="140" />

can you tell me how?

+3  A: 

You should use <embed> tag to embed flash files to an html page :

<object width="650" height="140">
  <param name="movie" value="exactheader.swf">
  <embed src="exactheader.swf" width="650" height="140"> </embed>
</object>

EDIT : As Russ pointed, I just found the resource why we should use both object and embed tags here.

In the code above there is both an tag and an <object> tag. This is because the tag is recognized by Internet Explorer, and Netscape recognizes the <embed> tag and ignores the <object> tag.

Canavar
the embed tag has long since been deprecated, object should be used instead.
Russ Bradberry
I have removed the downvote seeing as you have updated your answer.
Russ Bradberry
+7  A: 

Try this instead:

<object width="650" height="140">
  <param name="movie" value="exactheader.swf">
  <embed src="exactheader.swf" width="650" height="140"></embed>
</object>
Druid
+1  A: 

I have found swfobject the 'best' method for embedding flash in html. It handles, version checking, alternate content, etc. Spend a few minutes getting familiar with this easy to use api: http://code.google.com/p/swfobject/

dallasweb