Today in my final project i was having extreme difficulty getting a movie clip to go to another scene on the release of the mouse. I struggled trying different types of coding and playing around with the movie clips and everything, but i just could not get it to work. First of all i was trying to get the end of an animation in a movie clip to go straight to the next scene, frame 7 by putting the coding, _root.gotoAndStop("Scene 2", 7); This however did nothing except go to the 7th frame of the movie clip animation that was already playing. I tried a whole bunch of variations of this code and even took out the animation completely and just had it so that the movie clip went straight to the next scene on release of the mouse button using, on (release) {_root.gotoAndStop("Scene 2", 7); Again this didn't recognize the scene part so i tried renaming the scene (and tried many variations of coding yet again) which still didn't work. So after this i finally found something that helped online which basically says to put a frame label on the frame you wish to go to on the next scene. I did this by naming it "rock" and starting trying different coding and eventually found that, on (release) {_root.gotoAndPlay("rock"); worked after putting it straight onto the main movie clip. This did however sacrifice the animation that went with the movie clip but i successfully made it go to the next scene and have put the animation at the start of the next scene.
No comments:
Post a Comment