I'd suggest you load all the images before you start the game, to avoid a slowdown due to loading time.
for example:
for i = 1 to 20
load image "Explosion" + str$(i) + ".bmp", i
next i
And you just loaded 20 images in three lines ranging from 1 to 20
In the game itself, it's enough to create a separate variable to handle the current animation frame number.
An example would be:
To initialize:
maxExplosions = 5
`the second parameter holds the values: x, y and frame (3 numbers in total)
dim Explosion(maxExplosions, 3)
To initiate or trigger an explosion
Explosion(CurrentExplosion, 1) = ExplodePositionX
Explosion(CurrentExplosion, 2) = ExplodePositionY
Explosion(CurrentExplosion, 3) = 1 : rem frame number 1
And to handle each explosion withing the game loop:
`maxExplosions is initialized at the top of your code
for explosion = 1 to maxExplosions
if Explosion(explosion, 3) > 0
`Display the current frame number
paste image Explosion(explosion, 1), Explosion(explosion, 2), Explosion(explosion, 3)
`Increase the current frame number
Explosion(explosion, 3) = Explosion(explosion, 3) + 1
`If the explosion reaches frame number 21 (there isn't a frame number 21), stop the explosion
if Explosion(explosion, 3) > 20 then Explosion(explosion, 3) = 0
endif
next explosion
However, this code is untested and I can't guarantee it will work. It just gives the idea...
[edit] It might be a little confusing at first since I used an array to handle multiple explosions at a same time.
It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.