Added:
inspector variables:
-runAnimation - let's you determine if the animation should play on start or not.
-loopAnimation - let's you specify weather or not the animation should loop.
methods:
-play()
-stop()
-pause()
The modified script is attached.