I would like to suggest the addition of a built-in icon function icon.Frames(icon_state).
It would return the amount of frames an icon_state has.
Currently, it can be done with counting the pixels by calling icon(icon,icon_state,dir,frame)and checking the frame if it has any pixels, which are not null, therefore it would continue to check the next frame until you get a blank frame, it would then return the frame count.
The problem with that is that if it encounters a blank frame, but an up coming frame is not blank it will not read on and returns the current count.
It can be fixed with a fail-safe, which allows you to check further frames if they are in use, but this would use up more processing power.
Jun 27 2013, 5:56 am (Edited on Jun 27 2013, 8:10 am)