Can tag alone can be used to display swf?

The typical way to insert an swf onto an html page is to use <object> and <embed> tags together for IE and non-IE browsers. However, when such page is validated against xhtml standard, it fails because of the presence of the <embed> tag. Recently I had accidentally written the following code to insert swf.

<object data=”myFlashAppName.swf” width=”700px” height=”150px”></object>

 Amazingly, IE 7 and FF 2 both displayed the swf correctly. Only difference was IE also displayed a border around the swf which I have not been able to make it hidden. Yesterday I went to a friend’s place where he had a Mac and I tested it on the Safari and it displayed the swf just as well.

I’m not sure if older versions of browsers would support using just <object> tag as above. And besides is there are other issues with this approach of insert swf that I haven’t come across yet. I think I would need more research on this. Any comments would be appreciated.

Advertisements

~ by brianchau on March 31, 2007.

One Response to “Can tag alone can be used to display swf?”

  1. There are two relevant articles on ALA you may find useful :

    Flash Embedding Cage Match
    (http://www.alistapart.com/articles/flashembedcagematch )
    Flash Satay
    (http://alistapart.com/articles/flashsatay)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: