/ Published in: ActionScript 3

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var methodExist:Boolean; try { //FP10 and up: methodExist = this["unloadAndStop"] != null; } catch (e:Error) { //FP9: methodExist = this["unload"] != null; } //or public static function functionExists(obj:Object, name:String):Boolean { if ( obj == null ) return false; if (obj.hasOwnProperty(name)){ return true; } else { return false; } }
URL: http://www.wastedpotential.com/?p=299
Comments
