JSBool JS_DefineFunction()

Usage

JSBool JS_DefineFunction(unsigned short *name, JSNative call, unsigned int nargs)

Description

Method; registers a C-level function with the JavaScript interpreter in Flash. After the JS_DefineFunction() function registers the C-level function that you specify in the call argument, you can invoke it in a JavaScript script by referring to it with the name that you specify in the name argument. The name argument is case-sensitive.

Typically, this function is called from the MM_Init() function, which Flash calls during startup.

Arguments

unsigned short *name, JSNative call, unsigned int nargs

Returns

A Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.