1. Are you using skeletal animation? Or are you just using a frame based sprite? If it is not skeletal, you are using the wrong function to try to figure out the status of the animation.
2. sprite22 sounds like the name of a sprite resource. If that is correct, then you are still barking up the wrong tree. The amount of frames the sprite has will have nothing to do with what frame it is currently on in your object.
3. I don't know what Slidetrans() is.
4. Once you have set the image_speed to 1 once(typically when the animation starts), you don't have to do it again. So even once you fix the issues about detecting when the animation is finished, you won't need the else{image_speed = 1} part, because image_speed will be 1 from before anyway, so it is a slight waste of code and time. It doesn't affect much at this scale, but you should get used to the idea of avoiding code that isn't needed, as later on the performance issues would be much larger.
Now, about your issue, if you are using regular frame based animations, you figure things out in different ways. You can use the animation end event, which will execute once the sprite is done with that animation. The catch there is simply that you will want to verify which animation it is(or store the state in a variable) so you can do your transition only if it is coming from the right point. An alternative if you want to actually check within the step event, you can use the image_index variable to check. It increases frame by frame, so you can see once it is past the frame you care about, you then go into the transition.