Targeting image problem

Talking to a friend, He gave me a script to target an image to tell it to play the rotation of pictures inside it. It was a button that had Eye.play(); In its code(My image is named Eye).

He said it was As2.0, I use As3.0 so I dont know if As3 just doesnt like that code, Or I did something wrong…

Is this the correct way to target an image with a button and tell it to play the animation inside it with As3.0?

Thanks