BMAP* animated_sprite = "explo+7.png"; // Here your file
var animation_offset = 0;
PANEL* panel_animate =
{
pos_x = 10;
pos_y = 10;
window(0,0,180,180,animated_sprite,animation_offset,0); // Replace 180,180 with the size of one sprite
flags = SHOW;
}
function animate_panel() // Run to start animation
{
int iWidth = bmap_width(animated_sprite);
int iHeight = bmap_height(animated_sprite);
while(1)
{
animation_offset += iHeight;
animation_offset %= iWidth;
wait(-0.05); // Animation speed
}
}