Really your right code must be...
if(iAnimation1 and key(_1))
fli_end(iAnimation1);
iAnimation1=null;
end
I was just explaining the mistake

In the wiki I used something like that. 1 starts/stops one animation and 2 starts/stops the another one. So this is what I done:
if(key(_1))
//Do nothing until the key is released
while(key(_1))frame; end
if(iAnimation1!=null) //If the animation wasn't terminated...
fli_end(iAnimation1); //...stop only the simple animation...
iAnimation1=null; //...and reset the handle
else
iAnimation1=fli_start("animation.fli",50,80);
end
end
The complete code is in
http://wiki.bennugd.org/index.php?title=Fli_end Please take a look, as I'm using the same example for 4 functions.