5 Replies Latest reply on Aug 21, 2006 7:26 AM by kglad

    gotoAndStop then loadMovieNum problems

      I have a navigation system with buttons that on release gotoAndStop at a label. The frame with the label has the code stop(); loadMovieNum("some.swf",50). The buttons are always visible on the left so I can load other swf on the right when clicked.

      On one of the buttons I load a component which contains a movie clip with a button that on release has the following action script. this.gotoAndStop("labelincomponent"). At this label I have loadMovieNum("someswfincomponent.swf",50); stop();

      All works fine until I click the navigation button on the left that originally loaded the component with the move clip that had the button loadMovieNum("someswfincomponent.swf",50); stop(); It does't do anything. It won't load "someswfincomponent.swf",50).

      I can click any other navigation button on the left that on release gotoAndStop at a different label on the main time line and does a loadMovieNum("someother.swf",50); stop();

      After I have done that I can click on my button to load the component with the button that does the loadMovieNum("someswfcomponent.swf",50); stop(); and it works fine.

      I am thinking I must have a level, or relative or absolute path messed up. I have tried adding the _parent, _root and _level0, but they don't seem to help. If someone can help I would appreciate it.

        • 1. Re: gotoAndStop then loadMovieNum problems
          kglad Adobe Community Professional & MVP
          your second paragraph should say "..i load a swf that contains a component and a movieclip...", correct or do you mean something else?

          if correct, you have a loadMovieNum("someswfincomponent.swf",50); statement attached to a button in your main navigation swf and attached to a frame in someswfincomponent.swf, correct?
          • 2. Re: gotoAndStop then loadMovieNum problems
            izm067 Level 1
            The second paragraph - Confusing--yes it is. I load the swf which has the button that on release has the this.gotoAndStop("label"). At this label I have loadMovieNum("someswf",50); stop();

            The answer to your question is yes. Thank you for trying to understand and help.
            • 3. Re: gotoAndStop then loadMovieNum problems
              kglad Adobe Community Professional & MVP
              post a link to the minimum number of flas that are needed to display the problem and specify the location of the buttons and code that are problematic.
              • 4. Re: gotoAndStop then loadMovieNum problems
                izm067 Level 1
                I made some revisions to what I was doing so it would work. I think I can get the old fla/swfs that didn't work and post them if it is necessary to figure out what I was doing wrong. But I believe if you go to http://www.jewellofts.com/index09152006.html and I tell you what was not working and what I did to fix it, maybe you can give me some insite as what I was doing wrong.

                The navigation is contained in a movie clip on the left. When pressing one of the LIVING HERE, LOCATION, etc, buttons, I had an on release go to label and in that frame I attached an action LoadMovieNum("livinghere.swf", 50) which puts things into the white space and leaves the things in the black space as is. There is also a button over the logo at the bottom left and when clicked does a LoadMovieNum("first.swf",50) which loads the information in the white space that comes up when the home page first loads.

                The problem I was encountering was if I would choose any of the buttons on the left and for explaining, say I choose LIVING HERE followed by choosing the logo at the bottom left which took me back to the home page by loading the home page white information. Then if I clicked the LIVING HERE again, nothing would happen, the SWF would not load. If I hit any button other than the one I hit before hitting the logo to load the original home page that goes in the white spot (ie. LoadMovieNum("homewhitespace.swf",50)) it works fine and then I can click the LIVING HERE and it works fine and all is well until I hit the logo that puts the home.swf into the white space. The logo button is just a button on the black space fla/swf that contains the navigation movie clip. I got around the problem by adding the line LoadMovieNum("blackspace.swf",1) before the line LoadMovieNum("whitespacehome.swf",50) to the on release action of the button attached to the logo on the bottom left.

                Thanks for trying to help me out and hopefully I have given a logical understandable outline of the problem.
                • 5. Re: gotoAndStop then loadMovieNum problems
                  kglad Adobe Community Professional & MVP
                  here's the problem:

                  you have a timeline with a frame labelled "living here" and that frame contains a loadMovieNum() statement.

                  if you execute a gotoAndStop("living here") twice in a row the 2nd time the playhead does NOT exit and re-enter "living here". it just stays in "living here" and the code in "living here" is therefore NOT executed the 2nd time.

                  the playhead must move to another frame (ie, press another button) and it can then re-enter "living here" and it will then execute the loadMovieNum() statement.

                  you found a remedy. just reload the entire navigation (so the playhead is no longer on "living here"). but that's a pretty drastic remedy.

                  the simplest remedy, is to put your loadMovieNum() statement in a frame AFTER "living here" and place a stop() next to your loadMovieNum() statement. you can then use gotoAndPlay("living here") repeatedly and each time it will cause your loadMovieNum() statement to execute.