Action script help

I wanted to know how to make it so i can have it so when they roll over on it will open but in the same symbol have it say on roll out. For exaple.
On(rollover){
gotoandplay(“open”);

on (rollout){
gotoandplay(“close”);
}

Could i have that in the same symbol?