Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Adobe Creative Suite

  • Print
  • + Share This
Like this article? We recommend

Handling Unsupported Browsers

What happens if the user’s browser doesn’t support the ExternalInterface class? Flash offers an available property with a Boolean value that can be used to check whether the class is available before you execute the code. This is also a good time to display a message, if the users’ browser doesn’t support the class. The following code is used in the sample to handle these situations:

 this.message._visible = false;
 ExternalInterface.addCallback("highlightItem", this, highlightItem);
 ExternalInterface.addCallback("addAllItems", this, addAllItems);"onFlashLoaded");

This code checks for the availability of the class; if it’s not supported, the code is never executed, and the message that displays the requirements is left visible to inform the user of the issue.

  • + Share This
  • 🔖 Save To Your Account