# NNS_G2dSetCallBackFunctorAtAnimFrame

## Syntax

      #include <nnsys/g2d/g2d_Animation.h>

      void NNS_G2dSetCallBackFunctorAtAnimFrame(
                            NNSG2dAnimController*   pAnimCtrl,
                            u32                     param,
                            NNSG2dAnmCallBackPtr    pFunc
                            u16                     frameIdx );

## Arguments

`pAnimCtrl` | [OUT] `NNSG2dAnimController` entity
`param` | [IN] u32 data used as a callback function argument
`pFunc` | [IN] Pointer to callback function
`frameIdx` | [IN] Index of AnimFrame that calls the callback

## Return Values

None.

## Description

Sets the callback to the animation controller. The callback can register only one type to each controller entity. Do not set this function's type argument to anything other than `NNS_G2D_ANMCALLBACKTYPE_SPEC_FRM`. If necessary, use the `NNS_G2dSetAnimCtrlCallBackFunctor` function instead.
At the timing of the changing playback frame, the index of the new play frame is compared with `frameIdx`. If they are identical, a callback is called.
The name of this function has changed to `NNS_G2dSetAnimCtrlCallBackFunctorAtAnimFrame`. To maintain compatibility, the previous function was kept under a different name.

## See Also

`NNS_G2dSetAnimCtrlCallBackFunctorAtAnimFrame`
`NNS_G2dSetAnimCtrlCallBackFunctor`

## Revision History

2004/08/02 Renamed function.
2004/05/28 Initial version.

CONFIDENTIAL