00:00
00:00
Newgrounds Background Image Theme

RobotHeadProductions just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Looping Button? Uh...help?!

468 Views | 11 Replies
New Topic Respond to this Topic

Looping Button? Uh...help?! 2008-03-20 00:05:44


Well, currently I am trying to script this movie clip which has buttons within it. The main reason I'm trying to do this is because my menu to play scenes are on a certain frame, and if I just place all the work within the layers, it'll fuck up my other scripting.

So here's the problem;

This is the code I'm using:

on (release) {
gotoAndPlay("Scene 2", 121);
}

I simply want the button to play the selected frame so I can continue on with my animation. But it's not letting this take place. Instead of just going to frame 121 on Scene 2, it replays the movie clip instead and goes back to the beginning.

So please tell me what's going on.

Thank you.


BBS Signature

Response to Looping Button? Uh...help?! 2008-03-20 00:18:37


If the buttons are inside the MC, it may be trying to play the MC's frames instead. Try:
_root.gotoAndPlay("Scene 2", 121);
or whatever, just add _root.


"Sit down and shut up and do as I say" -- Zeus

BBS Signature

Response to Looping Button? Uh...help?! 2008-03-20 00:21:09


You can't skip to a frame and expect it to start there on the MC. Make it so you say...

_root.mcname.gotoAndPlay(_root.currentframe);

Or whatever, something that will skip it to the right spot.


MY E-PENIS IS BIGGER THAN YOURS

8=================================>

...and this is my fag...

BBS Signature

Response to Looping Button? Uh...help?! 2008-03-20 00:23:54


At 3/20/08 12:21 AM, El-Presidente wrote: You can't skip to a frame and expect it to start there on the MC. Make it so you say...

_root.mcname.gotoAndPlay(_root.currentfr ame);

Or whatever, something that will skip it to the right spot.

I don't want it to play the frame within the movie clip, I want it to be external from the movie clip on to the timeline AFTER the movie clip.


BBS Signature

Response to Looping Button? Uh...help?! 2008-03-20 00:39:25


Rudy! Do the bump! Do the bump!

I don't really understand the question, can you rephrase por favor.


MY E-PENIS IS BIGGER THAN YOURS

8=================================>

...and this is my fag...

BBS Signature

Response to Looping Button? Uh...help?! 2008-03-20 00:42:19


At 3/20/08 12:39 AM, El-Presidente wrote:
Rudy! Do the bump! Do the bump!
I don't really understand the question, can you rephrase por favor.

Okay.
I have a movie clip that has my menu in it. It has buttons within the menu. The buttons consist of codes to play certain areas on the main timeline (which is outside the movie clip.) Instead of playing the frames on scene 2, it tries to find the frames within the movieclip rather than the main timeline OUTSIDE the movie clip. :/


BBS Signature

Response to Looping Button? Uh...help?! 2008-03-20 00:45:09


Does my idea just totally not work?


"Sit down and shut up and do as I say" -- Zeus

BBS Signature

Response to Looping Button? Uh...help?! 2008-03-20 00:46:22


At 3/20/08 12:45 AM, OneWhoListens wrote: Does my idea just totally not work?

Yeah, it doesn't. It says there are errors within the script. :(


BBS Signature

Response to Looping Button? Uh...help?! 2008-03-20 00:48:47


At 3/20/08 12:46 AM, Rudy wrote:
At 3/20/08 12:45 AM, OneWhoListens wrote: Does my idea just totally not work?
Yeah, it doesn't. It says there are errors within the script. :(

...adding a _root in front of a gotoAndPlay() will not create errors. And may help.


BBS Signature

Response to Looping Button? Uh...help?! 2008-03-20 00:49:40


....hah...that's all?

on(release){
_root.gotoAndStop(Frame #);
}


MY E-PENIS IS BIGGER THAN YOURS

8=================================>

...and this is my fag...

BBS Signature

Response to Looping Button? Uh...help?! 2008-03-20 00:52:50


At 3/20/08 12:49 AM, El-Presidente wrote: ....hah...that's all?

on(release){
_root.gotoAndStop(Frame #);
}

I've tried adding a root in front of it all. Shame it doesn't work. I just somehow moved all the work from the movie clip onto the time line and it soon worked. The problem that messed up the coding was that it thought to move everything to certain frame on the movieclip's time line rather than the time line in which the movie clip was on.

Oh well. Problem solved another way. Thanks guys for your help.


BBS Signature

Response to Looping Button? Uh...help?! 2008-03-20 00:55:24


You're sure you stuck that within the button? There's no reason it shouldn't work, but if you got it another way, congrats.


MY E-PENIS IS BIGGER THAN YOURS

8=================================>

...and this is my fag...

BBS Signature