Skip to main content
Participant
May 10, 2006
Answered

unexpected behavior when button is clicked-"playhead" jumps to wrong frame

I'm working on a flash site, and am running into an actionscript issue that has me a bit stymied.

The main .fla timeline is 42 frames long. Frames 1-23 are the preloader, each frame between frames 24-31 contain one of the sections of the site, then frames 36-42 contain subsections of one of the main sections. 32-35 are just blank frames to help me keep things visually separated while I'm working on this project.

In frames 36-42 I have a sub-navigation for that subsection setup. For each of the buttons in that sub navigation, I've attached a very simple actionscript that links to the other subsection pages. I've used actionscript like I've shown below, where "web" in this case, is the name of the frame that I'm targeting:
on (release) {
gotoAndPlay("web");
}

When I click on a link to take me to the final frame, which happens to be named "specevents" (special events), it takes me to that frame correctly. If I click the "specevents" button again while still in that frame, I'm taken back to the preloader screen. This type of jump also happens from within some of the other sub-navigation buttons, i.e., clicking a link for a frame which I'm already in will take me to a totally unexpected frame (always the same frame for each button, however).

Actually, in looking at it a bit closer, I find that whenever I click on one of the sub-nav links, it takes me forward one frame. Since the "specevents" frame is the last frame, it takes me back to the first frame of the movie.

This is all a little strange to me, since by all appearances, I've used the same method on the buttons of the main navigation, and they don't do anything unexpected when clicked.

FYI--the page in question here can be found at: http://gravitygroup.com/testflashy/ The "our work" section's sub navigation is what I'm looking at.

Any ideas? Thanks!
This topic is closed to new replies. Start a new post to keep the conversation going.
tonomudCorrect answer
Participant
May 10, 2006
aha! figured it out. The problem was that I had my sub-nav buttons grouped together so I could move them around as a unit. I ungrouped them, and everything works now!

thanks for taking the time to help!

4 replies

tonomudAuthorCorrect answer
Participant
May 10, 2006
aha! figured it out. The problem was that I had my sub-nav buttons grouped together so I could move them around as a unit. I ungrouped them, and everything works now!

thanks for taking the time to help!
Translate
Participating Frequently
May 10, 2006
Not sure what to tell you. I put together a skeleton program based on what you described above and it works as you would expect. The only thing that I had to do that I didn't see in your sample code was that I had to include "_root" before the gotoAndStop() method. Otherwise none of my buttons worked.

Sorry I don't have any other ideas.

Tim
Translate
tonomudAuthor
Participant
May 10, 2006
Yup, I've tried it, and it still acts the same. Thanks for the suggestion, though!
Translate
Participating Frequently
May 10, 2006
Have you tried replacing "gotoAndPlay()" with "gotoAndStop()"?

Tim
Translate