function AnimationManager:SetAnimationSequence(sequence, speed, blendtime, mode, specialFrames, specialFrameHook, endHookScript, endHook, endFrame)
Add 1 more parameter which is the last frame count value.
Ideally the AnimationManager script would not require that parameter and use this function to get it automatically instead but it doesn't at this time:
http://www.leadwerks.com/werkspace/page/api-reference/_/entity/entitygetanimationlength-r70