ActionInvocationEvent contains the object references on which the action was called.
It can be more than 1 objects if your action's acceptsMultipleTargets flag is set to true, but by default it will be only 1.
See this getTargetObject() helper method:
/**
* Get the action target as a IResourceReference
*
* @param event the ActionInvocationEvent
* @return the IResourceReference on which the action was called.
*/
privatefunction getTargetObject(event:ActionInvocationEvent):IResourceReference {
// Throw an error if actionContext.targetObjects is not an array with 1 object
// (ActionSpec property acceptsMultipleTargets is false by default)
var actionContext:ActionContext = event.context;
if (actionContext == null || (actionContext.targetObjects.length <= 0)
|| (!(actionContext.targetObjects[0] is IResourceReference))) {
throw (new Error( "Invalid action context for " + event.type));
}
return (actionContext.targetObjects[0] as IResourceReference);
}