function movie_control()
{
while (1)
{
if (key_i) media_stop(mhandle);
}
}
or as TheLiam says:
while (
!key_i)
Read the code exactly, don`t forget the "!", it means it doing the loop while i is NOT pressed (key_i = 0).
But with this code the function stops if you press i once, my example works all the time....
Your code:
while (key_i)
checks the first frame if you call this function if key i is pressed and if not the function is finishing...