• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

navigating from one movie clip to another within a scene

New Here ,
Aug 31, 2020 Aug 31, 2020

Copy link to clipboard

Copied

I am not able to figure out how to click a button in a movie clip that navigates to the start of a second movie clip, both residing in the same scene. This is using JavaScript controls (HTML5 Canvas), not ActionScript. I am creating a step-by-step tutorial where all steps are movie clips on separate layers of a scene with "Next" and "Back" buttons. Can someone help??

Views

209

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 31, 2020 Aug 31, 2020

Copy link to clipboard

Copied

this.parent is a reference to the parent timeline. 

 

this.parent.another_movieclip is a reference to another_movieclip that's on the parent timeline (at the time the code executes)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 31, 2020 Aug 31, 2020

Copy link to clipboard

Copied

If this is a step-by-step tutorial, you should put each step's movieclip in consecutive frames on the timeline. That way your next and back buttons just have to tell the container timeline to go to the previous and next frames.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

Thanks for the quick responses. I added the .parent, and that did force the button action to go from "Intro" to "Step1" in the parent timeline...

MongosWorld_0-1598976540479.png

Here is what the code looks like...

MongosWorld_1-1598976707575.png

The problem that I am having now is that when the new movie clip loads, it doesn't stop there and play that clip, but rather it cycles through all the movie clips on the parent timeline in a split second, then replays the intro movie clip again. Am I leaving something out of the code?

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

First, there's no reason to put each movieclip on its own layer.

 

Second, it's doing exactly what you're telling it to: go to and PLAY.

 

If you want it to stop, tell it that instead.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

also, do you have frame labelled "Step1"?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

I was able to get the code right so I can jump from one movie clip to another within a single scene. I am now running into a problem where I have two buttons (hotspots) in a scene. Each button instance has its own distinct name but otherwise the action for each button is nearly identical (See screenshot)

Animate01.PNGAs you can see, I have each button called out in the timeline. One is set to go to and stop on frame 5 of the main scene and the other is set to go to and stop on frame 6 (See main scene timeline below)

Animate02.PNG

The problem I am running into is when I got to preview the scene, it works until I get to the part where I choose one of the phones. Both hotspots are navigating to frame 6 (Android). Can someone tell me why this is happening?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 22, 2020 Sep 22, 2020

Copy link to clipboard

Copied

those are frames 4 and 5, not 5 and 6.  fix your code and retry.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 25, 2020 Sep 25, 2020

Copy link to clipboard

Copied

Not sure why you would call out those frames as 4 and 5. When I manually move the timeline to each respective frame called out in my screen cap above, they are clearly indicated as 5 and 6. I tried what you suggested anyway and it did not work. Not sure why this is so difficult. Even my "Back" and "Next" buttons are not functioning properly. The "Next" button works, but the "Back" button does not while using the exact same code (But calling a different frame to navigate to in the main scene). I really need some help here!

Animate03.PNG

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 25, 2020 Sep 25, 2020

Copy link to clipboard

Copied

LATEST

the first frame is frame 0 in canvas so fixing your frame numbers will fix an error in your coding.  if that doesn't solve all the problems there are other errors and you'll need to explain more clearly one of the problems you see.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines