Switching between scenes using buttons...not working?

Posted on 2003-12-10
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.
Question by:hayeahright21
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
LVL 39

Expert Comment

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.

Accepted Solution

rexmor earned 500 total points
ID: 9925855

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

on (release){

hope that helps.


Expert Comment

ID: 9925862
on (release){

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.


Author Comment

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() {

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 =-

Expert Comment

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??

Expert Comment

ID: 10292942
I got
on (release) {
tellTarget("_level1.Symbol 2"){
But that doesn't work :(

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
WMV file has abnormal script stream which may cause production problems. 7 760
Flash player plugin 13 7 358
free flash maker 5 222
Create animated movies for web page 18 170
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
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 use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

738 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