Skip to main content
Participant
June 14, 2010
Question

Conflicting action scripts?

  • June 14, 2010
  • 1 reply
  • 576 views

I added a website preloader in a separate scene to the main frame of my website and scripted it to go to and Play the main scene or frame of the website when finished loading. I then put a command in the first frame of the main scene for the movie to stop (); at that point. The problem is that now the buttons on the main page don't respond to any behaviour commands to go to and stop at other frames in the main scene. I'm not sure if this is a conflict between the stop(); command in the main scene and the button behaviour command to go to and stop at another frame or an error with the way I'm identifying the scene and frame.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
June 14, 2010

do ALL your goto statements include a scene and frame reference?

j2oreillAuthor
Participant
June 14, 2010

Yes, I included a scene and frame reference for every instance with code. The button works if I instruct it to go to frame "2", but this just returns it to the preloader scene, rather than frame 2 of the Main scene

This is the functional, but incorrect code:

on (release) {

//Movieclip GotoAndStop Behavior

this.gotoAndStop("2");

//End Behavior

}

This is the dysfunctional, but necessary code:

on (release) {

//Movieclip GotoAndStop Behavior

this.gotoAndStop("Main",2);

//End Behavior

}

kglad
Community Expert
Community Expert
June 14, 2010

that's as2 code.

never use scene information in navigation with as2:  use frame labels, and the goto methods (not goto functions):

whatevertimeline.gotoAndStop("frame_label");