void CreateFunction(Value* pvalue, FunctionHandler* pfc, void* puserData = NULL);
CreateFunction creates a function object that wraps a C++ function. The function object is similar to any other AS2 object, but supports the ability to be invoked in the AS2 VM.
Parameters |
Description |
Value* pvalue |
Value holder for the created function. |
FunctionHandler* pfc |
C++ callback to be wrapped by the custom function object. See FunctionHandler. |
void* puserData = NULL |
User data attached to the function object. This data is returned in the C++ callback. It is commonly used as a switch to differentiate callbacks to the same context object. |