Hello again This time i have a problem with intervals.

I putted this:

function wait()
{
stop ();
var myInterval = setInterval(function ()
{
play ();
clearInterval(myInterval);
}, 5000);
} // End of the function
wait();

To the 1st frame and it works. Stops for a few seconds and plays. Then i putted this to the 2nd frame to make it stop too. It appears a duplicate error. How make it works then?