Looks like you can get (or set) the current frame number in an
AnimatedSprite via its
frame property. So, setting that to an appropriate value should shift the animation to the defined frame.
So, something like:
$AnimatedSprite.frame = 4
If you need the number of frames in the animation (to drive the random frame selection) you can get that via: