25.115. ExternalInterface.addCallback( ): expose an ActionScript method for execution from JavaScriptActionScript function in Flash 825.115.1. Synopsisboolean ExternalInterface.addCallback(String name, Object instance, Function func) 25.115.1.1. Arguments
25.115.1.2. ReturnsTRue on success or false on failure. 25.115.2. DescriptionThis static function is used by ActionScript code in a Flash movie to enable JavaScript code in a web browser to invoke ActionScript code. When addCallback( ) is invoked, it defines a top-level JavaScript function called name which, when invoked, calls the ActionScript function func as a method of the ActionScript object instance. The arguments to the JavaScript function are converted and passed to func, and the return value of func is converted and becomes the return value of the JavaScript function. Arguments and return values can be primitive numbers, strings, boolean values, and objects and arrays that contain primitive values. However, it is not possible, for example, to pass a client-side JavaScript object such as a Window or Document to an ActionScript function. It is also not possible to return a Flash-specific ActionScript object such as a MovieClip to JavaScript. 25.115.3. See AlsoFlashPlayer; Chapter 23 |