Handling old flash versions
You can supply the required Flash version in the second argument for flashembed like this:
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.
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:
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:
And here is the corresponding HTML code:
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:
JavaScript coding
Here is how the above example was configured: