getSpriteAnimFrameCount()
Purpose
Find the number of frames in an animated sprite
Description
Syntax
count = getSpriteAnimFrameCount( sprite )
Arguments
sprite handle of the sprite
count number of animation frames in the sprite
Example
image = loadImage( "Untied Games/Explosion 01", false )
explosion = createsprite()
setSpriteImage( explosion, image )
setSpriteAnimation( explosion, 0, 69, 60 )
setSpriteLocation( explosion, { gWidth() / 2, gHeight() / 2 } )
setSpriteScale( explosion, { 5, 5 } )
tiles = getSpriteAnimFrameCount( explosion )
for i = 0 to tiles loop
clear()
setSpriteAnimFrame( explosion, i )
drawSprites()
update()
repeat
Associated Commands
getSpriteAnimFrame(), getSpriteAnimSpeed(), setSpriteAnimation(), setSpriteAnimFrame(), setSpriteAnimSpeed()