CallFunction
[...arguments, argsCount, functionName] → [returnValue]

Adobe documentation

ActionCallFunction

ActionCallFunction executes a function. The function can be an ActionScript built-in function (such as parseInt), a user-defined ActionScript function, or a native function. For more information, see ActionNewObject.

FieldTypeComment
ActionCallFunctionACTIONRECORDHEADERActionCode = 0x3D

ActionCallFunction does the following:

  1. Pops the function name (String) from the stack.

  2. Pops numArgs (int) from the stack.

  3. Pops the arguments off the stack.

  4. Invokes the function, passing the arguments to it.

  5. Pushes the return value of the function invocation to the stack.

    If no appropriate return value is present (that is, the function does not have a return statement), a push undefined message is generated by the compiler and is pushed to the stack. The undefined return value should be popped off the stack.

For all of the call actions (ActionCallMethod, ActionNewMethod, ActionNewObject, and ActionCallFunction) and initialization actions (ActionInitObject and ActionInitArray), the arguments of the function are pushed onto the stack in reverse order, with the rightmost argument first and the leftmost argument last. The arguments are subsequently popped off in order (first to last).