Quick Tip: Use SWFObject to Embed Your Flash Content


In this Quick Tip screencast, I'll show you how to embed your Flash SWFs in an HTML webpage using SWFObject.

Where to Get SWFObject

The latest version of SWFObject is available on its Google Code page. Grab whichever file is marked as "Featured" on this page (at time of writing, that's version 2.2).

Watch the Screencast

Don’t like ads? Download the screencast, or subscribe to Activetuts+ screencasts via iTunes!

The Starting HTML

For a beginner's guide to HTML, see this tutorial.

<!DOCTYPE html>

The Final HTML

<!DOCTYPE html>
		<title>Our HTML Page</title>
		<script type="text/javascript" src="swfobject.js"></script>
		<script type="text/javascript">swfobject.embedSWF('animation.swf', 'flash', '550', '400', '9.0.0');</script>
		<div id="flash">
			<p>At this moment you do not support Flash Player 9. We're sorry.</p>

Thank You

Thank you for watching, if you have any questions, feel free to comment.

Related Posts