"if/then" is it possible

I’ve got my self into a bit of a pickle. I’ve created a simple site. The navigation is loaded into a Movie Clip and almost all of my animations are placed on the timeline in the form of movie clips. So the time line doesn’t have very many frames(only 4), but when navigating the buttons tell the Movie clips on the stage to “gotoAndPlay” for fade ins and fade outs.

But because the site isn’t linear(go from a>b>c>d) you can go from a>c>b>d and all sorts of combinations. so for example when the main timeline is on frame one then told to gotoAndPlay frame 4 I only want the movie clips on the present frame and frame 4 to play.

So I was think of using an if/then but I am curious if it’s posible to use the frame as the condition?

HELP PLEASE

here’s on of the button’s actions and it wworks great on frame 1 but when it’s on it’s own frame it plays itmes that we don’t want (picture_mc). So it would be great if it played the picture_mc except when it’s on its repected frame.

on(release) {
_root.gotoAndPlay(“home”)
_root.picture_mc.gotoAndPlay(“fade”)
}