Scaleform::GFx::FunctionHandler::Params

Scaleform::GFx::FunctionHandler::Params
struct Params {
  Value* pRetVal;
  Movie* pMovie;
  Value* pThis;
  Value* pArgsWithThisRef;
  Value* pArgs;
  unsigned ArgCount;
  void* pUserData;
};
Description

Params is a structure listing the parameters passed in to the callback from the AS2 VM. 

The Params::pThis points to the calling context (undefined if not applicable). The calling context is usually the object that owns the function object. 

E.g:

   var obj:Object = {};
   obj.myfunc();      // obj is pThis

The Params::pArgsWithThisRef is used for chaining other function objects. A chain can be created by using the following syntax (if MyOtherFuncObj is a reference to a valid function object):

   MyOtherFuncObj::Invoke("call", NULL, params.pRetVal, params.pArgsWithThisRef, params.ArgCount + 1)

Chaining is useful if there is a need to inject a callback at the beginning or end of an existing AS2 VM function.

Members
Members 
Description 
Value* pRetVal; 
Return value of Value type. This parameter is expected to be filled in by the user if a return value is expected by the function's semantics. 
Movie* pMovie; 
Pointer to Movie object. 
Value* pThis; 
This pointer pointing to the calling context (undefined if not applicable). The calling context is usually the object that owns the function object. 
Value* pArgsWithThisRef; 
Special pointer to the array of parameters passed in to the callback, plus the 'this' reference. This pointer is used for chaining other function objects. Ex: myOtherFuncObj.Invoke("call", NULL, params.pArgsWithThisRef, params.ArgCount+1) 
Value* pArgs; 
Array of Value type passed to the callback function. 
unsigned ArgCount; 
Number of arguments passed to the callback function. 
void* pUserData; 
Used for custom function object specific data, such as an index that can be used as a switch inside a single function context object. This data is set by the Movie::CreateFunction
File

GFx_Player.h