Graphic Design shadow to enhance presentation of images.
Graphic Design shadow to enhance presentation of images.

Web Design - Tips, Tricks and Programmng

Loading Flash banners with W3C compliance

Return to Forum Home Page

Forum

Return to Topic

Return to Topic

Login to Forum

Login to Forum

Register to access Forum

Register to access Forum

Previous Thread Return to Topic Next Thread
Author Message

Norm Jurgen

Norm Jurgen

Date Joined:
Jan 19, 2010

Posts:
56

Posted: Mon Feb 8, 2010 01:26 PM

Subject: Loading Flash banners with W3C compliance

For those Flash designers and developers out here using Adobe to write and HTML script to load Flash within a page is not always a good idea. For one thing, the code that Adobe automatically generates is not W3C compliant.

There are many solutions to this problem but the easiest and most readible accessible comes directly from DreamWeaver - oddly enough, another Adobe product.

Below is a little script that we use here at 17 Designs. This particular bit of code loads a banner sized 683 x 133 pixels called movieClass.swf. For non-IE browsers, there is a separate section that IE will overlook.

We surround the script with a <div> tag that is specifically sized to the exact dimensions of the Flash SWF file. This is important if you want the SWF file to appear the same in Firefox as it does in IE.

For non-Flash enabled browsers we created a static image that is sized the same as the SWF file.

It is a pretty cool snippet of code and fully W3C compliant.

<div class="top-feature">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="683" height="133" id="FlashID" title="ActionScript 3.0 Flash Programming">
<param name="movie" value="movieClass.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="swfversion" value="9.0.45.0" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="movieClass.swf" width="683" height="133">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="swfversion" value="9.0.45.0" />
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<a href="http://www.adobe.com/go/getflashplayer" title="Your Flash Player is either too old or not enabled preventing you from viewing this image properly; click on this image to install latest Flash player."><img class="FeatureAlignment" src="images/actionscript/feature-noflash.jpg" alt="Your Flash Player is either too old or not enabled preventing you from viewing this image properly; click on this image to install latest Flash player." border="0" /></a>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>

Return to Forum Home Page

Forum

Return to Topic

Return to Topic

Login to Forum

Login to Forum

Register to access Forum

Register to access Forum