How to embed flash using U.F.O.
May 26th, 2007
This HowTo will explain the process of embedding flash elements that display placeholder content for flash-disabled browsers using U.F.O. while keeping your pages standards compliant… for noobs.
Everyone wants to use flash on their websites. But this can be very problematic. There are still a small percentage of users that have not installed the latest version of the flash plug-in, or have it enabled. This population usually consists of older people (on older machines), some company employee workstations, and school computers. The largest pitfall here is creating your main navigation in flash without a ‘backup’ navigation for those mentioned without flash.
It is almost NEVER a good idea to create any navigation in flash. Search engine bots cannot spider your site. This is critical if Search Engine Visibility is at all important to you or your client. Visitors cannot navigate beyond your landing page if they have flash disabled or not installed.
The very few occasions where it’s considered ok to use flash for any navigation in your site is:
• The fancy flash navigation is not the only way to click through your site (you have a visible html version of the same links somewhere else also).
• Your target audience is sure to have flash enabled, and you want to weed out those who don’t have flash at the same time.
• Your designing a site for a hard-headed client who doesn’t care about usability or if their visitors can navigate their site.
• You have an html version to seamlessly replace your fancy flash navigation in the case of those depraved visitors mentioned earlier.
Flash is best used as an attention catching apparatus that may hold the impression you were trying to create in your audiences’ memory through motion.
So you are sure you still want to use flash on your website? Then I’ll explain how to do it correctly using the UFO javascript library. U.F.O (or Unobtrusive Flash Objects) is a DOM script that helps you embed flash objects on your site, while displaying ‘non-flash’ content in its place when it detects a browser without flash… and it’s W3C Standards Compliant.
First, download the latest version of the javascript library file ‘ufo.js’ from
http://www.bobbyvandersluis.com/ufo/ufo.jsNext, upload the javascript file to somewhere on your webserver.
For example: /js/ufo.js
Open or edit your (X)HTML page.
Create a placeholder element (any block element like “<div>”) for your flash object. Give it a unique id.For example:
<div id=”header_placeholder”> </div>
Add content that you would like to display to flash-disabled browsers inside of your placeholder element
For example:
<div id="header_placeholder"> <img src="/images/non-flash-header.png" alt="woot" /> </div>
Link the UFO script that you uploaded earlier, in the head of your page.
For example:
<head> <title>woot</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript" src="/js/ufo.js"></script> </head>
Define your flash object and their flash parameters in the head of your page and after the line in the previous step.
For example:
<head> <title>woot</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript" src="/js/ufo.js"></script> <script type="text/javascript"> var FlashHeader = { movie:"swf/flash-header.swf", width:"650", height:"120", majorversion:"9", build:"0" }; </script> </head>
These parameters are required:
- movie – path to flash file
- width – width of the flash file
- height – height of the flash file
- majorversion – lowest major version of the flash plugin required to view the flash object correctly (use the major version you used to compile/export your flash file with)
- build – lowest build version of the flash plugin required to view the flash object
Call the UFO.create function using the flash definition object and the id of the placeholder element.
*For example:*
<head> <title>woot</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript" src="/js/ufo.js"></script> <script type="text/javascript"> var FlashHeader = { movie:"swf/flash-header.swf", width:"650", height:"120", majorversion:"9", build:"0" }; UFO.create(FlashHeader, "header_placeholder"); </script> </head>
That’s it, now test it and enjoy sweet flashy standards compliant goodness.
*Other optional (flash) UFO parameters are:*
- id
- name
- swliveconnect
- play
- loop
- menu
- quality
- scale
- align
- salign
- wmode
- bgcolor
- base
- flashvars
- devicefont
- allowscriptaccess
- seamlesstabbing
- allowfullscreen
- allownetworking
UFO specific optional parameters are:
- xi:”true”
- ximovie:”[URL of express install Flash movie]”
- xiwidth:”[width of customized express install Flash movie]”
- xiheight:”[height of customized express install Flash movie]”
- xiurlcancel:”[URL of cancel page]”
- xiurlfailed:”[URL of failed page]”
- setcontainercss:”true”
More info here: http://www.bobbyvandersluis.com/ufo





March 10th, 2008 at 01:54 AM
tuuu, turutu-tu: http://forums.yesand.com/member.php?u=2861&c-topic=replica-watches generic cialis tramadol online cheap tramadol online Replica watches, replica rolex watches, replica watch, replica rolex, rolex replica http://www.fotolog.com/buycialis/about replica watch http://www.fotolog.com/buycialis/about Replica watches, replica rolex watches, replica watch, replica rolex, rolex replica http://forums.yesand.com/member.php?u=2861&c-topic=replica-watches
March 11th, 2008 at 09:36 AM
http://www.ittoolbox.com/profiles/buyvagraonline
March 12th, 2008 at 01:04 AM
http://conceptart.org/forums/member.php?u=101802
March 12th, 2008 at 04:45 PM
http://www.schrijversplaza.nl/forum/member.php?u=399&key=buy-cialis
March 13th, 2008 at 07:51 AM
http://battlecentre.net/forums/member.php?u=102&key=buy-tramadol
March 15th, 2008 at 08:58 PM
http://allilsite.info/cialis/blue-cross-blue-shield-cialis.php
March 16th, 2008 at 09:59 PM
http://allilworld.info/chanel-handbags/faux-chanel-handbag.php
March 17th, 2008 at 12:09 AM
http://allilsite.info/tramadol/no-prescription-cheap-tramadol.php
March 18th, 2008 at 03:08 PM
http://ambpa.info/adult-movies/young-teen-girls-sex-teenagers-preteen-porn.php
March 18th, 2008 at 10:12 PM
http://lotgd.net/forum/member.php?u=8879
March 20th, 2008 at 09:13 AM
http://www.plime.com/members/buy-cialis/
April 8th, 2008 at 06:23 PM
I like your logo. Your web site is helpful. Keep up the great work. I will be back!