Inserting flash files - Post ID 129262

User 1947912 Photo


Registered User
114 posts

Can anyone help with embeding .swf files within an html document. I have only recently been able to add these by saving all my files and then visiting Dreamweaver to simply drag the file into my div tag. I have reveiwed the code that dreamweaver outputs but cannot for the life of me understand the tags, especialy the long CLSID number, whatever it is. Can someone provide me with a walkthrough or link to some where that will learn me how to completely insert the finished swy file (& dependants) onto a html page without any more problems. This would be so highly appreciated.
Thank you once again guys...
www.andysmotorcycles.com
support@andysmotorcycles.com
(01782) 818097
Order motorcycle, scooter and motocross parts, spares and accessories online now.
User 364143 Photo


Guest
5,410 posts

Here is a link that describes the various object tag attributes.
http://www.w3schools.com/tags/tag_object.asp

The <object> tag is used by IE. For Mozilla-based browsers, you also need to use the <embed> tag.
http://www.w3schools.com/flash/flash_inhtml.asp

Used together
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" id="banner1" width="300" height="100">
<param name="movie" value="banner1.swf" />
<param name="bgcolor" value="#ffffff" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="title" value="bannerone" />
<param name="base" value="/" />
<param name="wmode" value="opaque" />
<param name="allowscriptaccess" value="samedomain" />
<embed type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" name="banner1" width="300" height="100" src="banner1.swf" bgcolor="#ffffff" quality="high" menu="false" title="bannerone" base="/" wmode="opaque" allowscriptaccess="samedomain"><noembed></noembed></embed>
</object>
CoffeeCup... Yeah, they are the best!
User 3004957 Photo


Registered User
866 posts

sh00ta

Tony has outlined the basics here. All you are doing is linking the object (the swf file) to your page and then setting up some parameters for it; does it auto-play, will it loop, that sort of thing. The CLSID is just a way for the browser to recognise what the file is; we don't need to get too wound up over the whole thing, just to know that it has to be there and formatted correctly for everything to work in all browsers. As Tony mentions, we have to use <embed> as well as <object> if we want the movie file to render in all browsers.

The best thing is if you have something like Form Builder or Firestarter is to create something basic with them, output it and see how it is all put together; once you break the seemingly complicated bits down, it starts making so much more sense.

Good luck.


Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.