Solved

Switching between scenes using buttons...not working?

Posted on 2003-12-10
6
356 Views
Last Modified: 2010-04-03
I have divided the content of the six sections of my movie into six scenes.  They all share the same basic layout including the navigation bar I would like used to switch between areas or scenes.  The common elements of that layout are grouped together as a symbol, and separate instances of that symbol appear in each of the six sections.

I am trying to get the buttons to navigate between scenes.  I've followed the instructions in the help file and as I've seen on this site.  I edit the symbol that contains the buttons, and set each button so it has a variation of this attached:

on (release) {
      gotoAndPlay("Home", 1);
}

where Home is whatever the name of the scene is.  I have also tried this using _root.gotoAndPlay.  As well, I've tried elevating the buttons from inside the common layout element symbol so they're their own instances within the scene.

When I test the movie, the buttons don't appear to work.  But here's the bizzarre thing--immediately after opening the document or reverting it, if i then double click on the symbol instance to edit it, then turn on simple buttons, then click one of the buttons, it works.  But only once, then it quits working again.  Somehow after that happens all the actionscript assigned to the buttons just dissappears.

I am totally baffled, and I'm hoping someone out there has encountered this before.  Thanks in advance for the help.
0
Comment
Question by:hayeahright21
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 39

Expert Comment

by:blue-genie
ID: 9911710
Hi there.
Assuming you're using MX,
your code is right, so I can only assume it's something really minor that you've overlooked.

You're duplicating  your grouped navigation in each scene, I can only suggest you check carefully
1. Names of each scene - remember they are case sensitive, use your scene inspector.
2. Check the code on your buttons that they are right for each scene
3. Do you get any errors in the output window when running your movie.
0
 
LVL 9

Accepted Solution

by:
rexmor earned 500 total points
ID: 9925855
hayeahright21,

Hmmnn may your button is inside a movieClip... if that's the case then please try this..

on (release){
tellTarget(_root){
gotoAndPlay("scene1name");
}
}

hope that helps.


rexmor
0
 
LVL 9

Expert Comment

by:rexmor
ID: 9925862
on (release){
tellTarget(_root){
gotoAndPlay("target_scene");
}
}


rexmor
0
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.

 

Author Comment

by:hayeahright21
ID: 9928368
There's one very important trick I've learned when trying to speak a foreign language: if you don't know the exact word for something, talk around it.  That's basically my solution to this problem: instead of having the button contain the command to go to a specific scene, it had this little bit attached to it:

on (press) {
    _root.DJButton.onRelease = function() {
        gotoAndPlay(3);
    };
}

Where "3" is a frame in the root movie and the same scene that contains the action telling the thing to go to the scene the button is intended to take you to.  So basically I did two steps to do one thing, but it worked.  Looking at rexmor's answer, though, I think that if I'd been patient enough to wait for it, it would have worked.  Seems like the prob relates to the button being embedded in a movie clip.

Thanks all for the help.

-= jonathan =-
0
 

Expert Comment

by:MasterStanF2k
ID: 10292712
question. Building on this... I have a preloader and basically 2 frames in SCENE 1 (root). I have 1 frame with preloader, and frame 2 has the main movie. The 2 frame has "scene 2" and in this scene, I need to be able to link to "Clan Info" which is the instance name of some frames. Anyways, instead of _root, what do I do??
0
 

Expert Comment

by:MasterStanF2k
ID: 10292942
I got
"
on (release) {
tellTarget("_level1.Symbol 2"){
gotoAndPlay("ClanInfo");
}
}
"
But that doesn't work :(
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
Suggested Courses

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question