Skip to main content
August 19, 2006
Question

gotoAndStop then loadMovieNum problems

  • August 19, 2006
  • 2 replies
  • 876 views
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.



This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
August 21, 2006
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.
kglad
Community Expert
Community Expert
August 19, 2006
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?
August 21, 2006
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.
kglad
Community Expert
Community Expert
August 21, 2006
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.