The way I see it with your code:
load animation "C:\Users\pc\Documents\Bandicam\bandicam 2015-11-01 17-11-21-262.avi", 3
load animation "C:\Users\pc\Documents\Bandicam\bandicam 2015-11-01 17-13-32-132.avi", 2
load animation "C:\Users\pc\Documents\Bandicam\bandicam 2015-11-01 17-26-45-644.avi", 1
play animation 3
do
gosub setanim
sync
loop
setanim:
animflag = 0
for i = 1 to 2
if animation playing (i) = 1 then animflag = 1
next i
if animflag = 0 and mouseclick() = 1
NUMB = 1 + rnd(1)
play animation NUMB
sync
randomize timer()
endif
return
Probably the problem is no sync in your do-loop code
BUT:
DELETE ANIMATION
This command deletes an animation previously loaded into the specified Animation Number. Deleting animations when you have finished with them improves system performance. If the animation is not
stopped before the animation is deleted, the current frame of the animation remains on the screen or bitmap.
STOP ANIMATION
This command stops the specified animation if it is playing.
So it maybe the case that you need to stop and delete the animations everytime and reload them
hope it can help