Ezilon.com - Target Your Audience, be Seen in Your Region

Insering flash to website

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

They have: 2 posts

Joined: Mar 2008

OK, folks, please remember that 3 months ago I knew NOTHING about HTML, images, website construction etc, and am still learning. I am the village idiot. Wink

OK, that said I've used the Flash 30 day trial period to construct a 25s flash intro, but have no idea how to insert it into a website. I guess I need to put it in the code at the beginning of my home page? Alas, Expression Web's onboard help and a reference manual are no help for how to do this (not sure if that's because it doesn't want to help Adobe users or there's some other problem).

Any ideas?

He has: 280 posts

Joined: May 2007

I use swfobject, available from the Google Projects library.

Quote: SWFObject is an easy-to-use and standards-friendly method to embed Flash content, which utilizes one small JavaScript file

Works well cross-browser, and lets you show alternative content to people who choose to surf with Flash turned off, or don't have it on their corporate machines or iPhone.

Cordially, David
--
"Old web developers don't die, they degrade gracefully..."

Roo's picture
Developer

She has: 830 posts

Joined: Apr 1999

This way is valid and doesn't involve any scripting:

Replace the file name with whatever you have named yours. Replace the width and height with the dimentions of your swf. This code uses a white background color...replace with hex code of the background color you need.

<object type="application/x-shockwave-flash" data="filename.swf" width="490" height="450">
<param name="bgcolor" value="#FFFFFF" />
<param name="movie" value="filename.swf" />
</object>

He has: 280 posts

Joined: May 2007

Roo and Moonhunter:
I think you should both read Flash Embedding Cage Match over at aListApart in order to understand the issues that SWFObject addresses. There is also UFO.

I advise against using the "object" tag on its own, for the reasons given in the article.

Cordially, David
--
"Old web developers don't die, they degrade gracefully..."