Detecting Flash Player 8 on a cfform

Now that we are using some features of the flash player 8 such as file upload, we need detect whether the user has it installed in his/her computer. Macromedia has recently published an article on DevNet that explains how to implement a detection script and new feature called "Flash Player Express Install", which greatly simplifies the flash install. To be honest, I didn't read the article, but instead, I made a small script that checks for the flash 8 inside the cfform.


Now that we are using some features of the flash player 8 such as file upload, we need detect whether the user has it installed in his/her computer. Macromedia has recently published an article on DevNet that explains how to implement a detection script and new feature called "Flash Player Express Install", which greatly simplifies the flash install. To be honest, I didn't read the article, but instead, I made a small script that checks for the flash 8 inside the cfform.

var version = getVersion(); var versionNumber = Number(version.substr(4,1)); if(versionNumber < 8) { //If the player is not version 8 or above, do something, such as showing an alert var msg = '

This example requires Flash Player 8 You can download it here

' var alertSettings:Object = {title:'Warning', message: msg, width:200, headerHeight:27 } //remember that this way of showing an alert may break in future versions of CF, but it is the only way to embed html in it errorpopup = mx.managers.PopUpManager.createPopUp(this, FormErrorException, true, alertSettings); errorpopup.centerPopUp(this); }

You can call this script whenever you want, I updated our previous example so now it checks for the latest player

You can view the updated version

Download the updated code