Simple (i think) problem with a gotoAndPlay

Hi I have what i imagine is quite a simple problem i just don’t know much action script at the moment.

I’ve basically got an animation which is started with

on (release)
{
play();
}

this take me to frame 10 where i have a stop();

however i need it to do a gotoAndPlay after the play is finished so i guess how i suspect it should look altough this doesn’t work is:


on (release)
{
    play();    //after this is complete do the below
    gotoAndPlay(41);
}

any ideas on how i could make this work would be great.

Thanks very much