This is a message.

Handling old flash versions

You can supply the required Flash version in the second argument for flashembed like this:

flashembed("clock", {
src: "/media/swf/global/clock.swf",
version: [20, 0]


This time, the second argument is not just a string, it's an object with two properties: src and version. The latter property specifies the required version that is required. We used a very large number so that you can see what happens without any additional setup.

standalone demo

The Default behavior

The default behaviour is to write the following HTML snippet to the container if the user does not have the required version:

  <div id="clock">
<h2>Flash version 20,0 or greater is required</h2>
<h3>Your version is 9,31</h3>
Download the latest version from
<a href="">here</a>


You can also style this content any way you want with CSS.

Default content in the container

If you are not happy with the default error message, you can supply your own error message simply by placing some HTML inside the container. Here is one example message:

Get Adobe Flash Player

You must have the latest Flash player installed. You can download it here.

standalone demo

And here is the corresponding HTML code:

<!-- here is the container with the default error message inside it -->
<div id="fail2">
<img src="/media/img/flashplayer_100x100.jpg" />
<h3>Get Adobe Flash Player</h3>
You must have the latest Flash player installed. You
can <a href="">download it
<br clear="all" />
<!-- place flash in our container and require version 20 and above -->
flashembed("fail2", {src: "/media/swf/global/clock.swf", version: [20, 0]});


Express Install and the custom onFail function

Here we are using Adobe's Express Install when an old Flash version is detected. Express Install is an option for seamlessly upgrading visitors to your website to the latest player using a Flash-based experience. Express Install allows you to design an in-context upgrade experience for your content so users never have to leave your site. It also lets you gracefully handle user cancellation and avoid system restarts.

We also use the onFail callback function here where you can do your own custom logic with JavaScript when an old version is detected. Here we write some information below the Express Install SWF file:

standalone demo

JavaScript coding

Here is how the above example was configured:

flashembed("fail3", {
src: "/media/swf/global/clock.swf",
// provide large enough version number so we can see what happens
version: [20, 0],
// supply your path to the express install Flash object.
expressInstall: "/media/swf/global/expressinstall.swf",
// called every time the supported version is not found
onFail: function() {
= "You need version 20.0 to view this content";