• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 931
  • Last Modified:

Skip to a specific frame in a scene

Hi. I have a flash movie with 4 scenes. Each scene acts as a different web page. I have a scene named "gallery" for pictures with a photoscroller. I want to make it so that when someone clicks on one of the thumbnail images in the slider they will get an enlarged version of the photo above it. The slider is made up of 2 movie clips one that contains the photos and the mousovers inside the other that allows for the scrolling action of the photos. I have everything for the gallery scene in the first frame and i made a layer for the enlarged photos with an enlarged version of each picture on a separate frame. I tried writing the actionscript to  jump to the corresponding frame for each picture but it doesn't work. I used: on (release) {
      _root.gotoAndPlay(2); and that takes me to the 2nd scene in the movie not the 2nd frame of the gallery scene. Anyone know how i can specify which scene and frame I want to jump to?
1 Solution
on (release) {
      gotoAndPlay("gallery", 2);
JonathanPittmanAuthor Commented:
i tried specifying "gallery" and nothing happens...
The best way to deal with this is to not refer to scenes...

Just use frame names and refer to those with your gotoAndPlay/Stop statements.
Name the first frame in your scenes to whatever and just do a gotoAndPlay("framename");
No reference to scenes needed.
yeah...agreed with mixart.

onFocus's code should work for you unless your button is inside a movieclip. If that is the case, gotoAndPlay("gallery", 2) will not work (because macromedia didn't allow it to work :p), you will have to use gotoAndPlay("framelabel") as what mixart had described.
JonathanPittmanAuthor Commented:
works great! thanks!

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now