Targeting frame names with if statements

Hi all

I am having a bit of problems in creating a varible for when a movieclip is on a certain frame.

For example I have created a moveclip called “cat” that consits of three label states. I have one button inside the movieclip that has the following actions asigned to it.

on (rollOver) {
gotoAndPlay(“select”)
}
on (rollOut) {
gotoAndPlay(“deselect”)
}
on (press) {
gotoAndPlay(“chosen”)
}

simply enough!

I have a second moveclip called “dog” that againconsits of three label states and again one button inside the movieclip that has the following actions asigned to it.

on (rollOver) {
gotoAndPlay(“select”)
}
on (rollOut) {
gotoAndPlay(“deselect”)
}
on (press) {
gotoAndPlay(“chosen”)
}

u will notice that the actions structure of dog is the same as cat

Right then what I am needing to do is create an if state that will detect the state of either buttons when either one is pressed e.g

For the movieclip called "cat the following code would look like this in theory.

on (rollOver) {
gotoAndPlay(“select”)
}
on (rollOut) {
gotoAndPlay(“deselect”)
}
on (press) {
gotoAndPlay(“chosen”)
if (_root.dog == (“chosen”)
_root.dog.gotoAndPLay(“select”)

}

I know my syntax is rubbish, but this just to give you an idea, obviously the same code would be used for the “dog” movieclip with the root reffering to the cat movieclip.

I just need some advice/help on refering to frame labels in moveclips and creating the condition statement for them.

If anyone can help

kind regards

w9914420