Condition for movie position

Hello,
I have a bit of a problem with a project I’m working on. I have a menu that is in frame one extended through frame 5. Frame 1-4 is used for the main page content of the movie, while frame 5 has a movieclip that uses the loadmovie command from the menu objects to go to. Frame 5 is also using the label “gallery”. Now, when i am in the movie on the main page and click a menu selection (Little People button) the script reads as follows:

on (release) {
_root.gotoAndPlay(“gallery”);
loadMovie(“galleries/littlePeople/set1.swf”, _root.thumbs);
}

So this takes you from frame 1 (the main page of the movie) to frame 5 (where the loadmovie is for the gallery images).

The problem arises when i click on another gallery selection (Big People button) and it goes to the “gallery” marker again because the script reads the following, and it does not load the movie until you hit the button again.

on (release) {
_root.gotoAndPlay(“gallery”);
loadMovie(“galleries/bigPeople/set1.swf”, _root.thumbs);
}

Now, i think i can solve the problem by writing an if then statement where if the playback head (or movie position, whatever you want to call it) on the root timeline is at the label “gallery” then it does not need to run the first command in the on (release) and just loads the movie, but if the playback head is anywhere OTHER than the label “gallery”, like say on the label “contact” then run the script to go to the gallery marker and then load the movie i want to load.

I do not know how to write the condition to do this because i’m fairly new to actionscripting and would greatly appreciate any help anyone can give me with this.

Thanks in advance.

  • Matt