It sounds easier to make .gif files in Photoshop rather than Gamemaker. In a .gif file in Photoshop, the image cycles from layer 1 (or 0, or 46 - whichever comes first) to the end, and then back to the first layer.