IActionScriptFunction

C++
struct IActionScriptFunction {
  struct Params {
    IFlashPlayer* pFromPlayer;
    void* pUserData;
    const IFlashVariableObject* pThis;
    const IFlashVariableObject** pArgs;
    unsigned int numArgs;
  };
  struct IReturnValue {
  };
};
File

IFlashPlayer.h

Description

Clients of IFlashPlayer implement this interface to replace inject C++ code into Action Script

IActionScriptFunction::IReturnValue Structure
C++
struct IReturnValue {
};
File

IFlashPlayer.h

IActionScriptFunction::IReturnValue::~IReturnValue Destructor
C++
virtual ~IReturnValue();
IActionScriptFunction::IReturnValue::Set Method
C++
virtual void Set(const SFlashVarValue& value, bool createManagedValue = true) = 0;
Description

Clients setting the return value in their implementation of Call() should think about "createManagedValue". For PODs its value doesn't have any meaning. When passing strings however it offers an optimization opportunity. If the string passed in "value" is managed by the client, there is no need to request internal creation of a managed value (a copy) as the (pointer to the) string will still be valid after Call() returns. However, if a pointer to a string on the stack is being passed, "createManagedValue" must be set to true!

IActionScriptFunction::Params Structure
C++
struct Params {
  IFlashPlayer* pFromPlayer;
  void* pUserData;
  const IFlashVariableObject* pThis;
  const IFlashVariableObject** pArgs;
  unsigned int numArgs;
};
File

IFlashPlayer.h

IActionScriptFunction::~IActionScriptFunction Destructor
C++
IActionScriptFunction::Call Method
C++
virtual void Call(const Params& params, IReturnValue* pRetVal) = 0;