Control/code issue

Hi All,

I am fairly new to actionscripting so I assume this is a fairly newb question.

Basically, I have my animation that includes Play/Pause button that I rigged up. I dont want the the movie to loop therefore I put a stop(); in the first frame, since my button changes from a Play icon to a Pause Icon. For the life me I can not work out how to make my animation to go back to the start and change my icon from the Pause icon back to the Play icon.

I assume I need some If statements, that will say something along the lines of if at end change icon to play, how should this code be written???

Pause Button Code:
on (release) {
gotoAndStop(1);
_parent.stop();
}

Play Button Code:
on (release) {
gotoAndStop(2);
_parent.play();
}

I have the controller code sitting within its own movieclip.

Any help would be greatly appreciateā€¦:ne: