Be a Supporter!

Looping Button? Uh...help?!

  • 294 Views
  • 11 Replies
New Topic Respond to this Topic
Rudy
Rudy
  • Member since: Jan. 1, 2005
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Looping Button? Uh...help?! Mar. 20th, 2008 @ 12:05 AM Reply

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
OneWhoListens
OneWhoListens
  • Member since: Aug. 23, 2006
  • Offline.
Forum Stats
Member
Level 26
Blank Slate
Response to Looping Button? Uh...help?! Mar. 20th, 2008 @ 12:18 AM Reply

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
El-Presidente
El-Presidente
  • Member since: Jun. 2, 2005
  • Offline.
Forum Stats
Member
Level 27
Blank Slate
Response to Looping Button? Uh...help?! Mar. 20th, 2008 @ 12:21 AM Reply

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
Rudy
Rudy
  • Member since: Jan. 1, 2005
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to Looping Button? Uh...help?! Mar. 20th, 2008 @ 12:23 AM Reply

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
El-Presidente
El-Presidente
  • Member since: Jun. 2, 2005
  • Offline.
Forum Stats
Member
Level 27
Blank Slate
Response to Looping Button? Uh...help?! Mar. 20th, 2008 @ 12:39 AM Reply

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
Rudy
Rudy
  • Member since: Jan. 1, 2005
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to Looping Button? Uh...help?! Mar. 20th, 2008 @ 12:42 AM Reply

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
OneWhoListens
OneWhoListens
  • Member since: Aug. 23, 2006
  • Offline.
Forum Stats
Member
Level 26
Blank Slate
Response to Looping Button? Uh...help?! Mar. 20th, 2008 @ 12:45 AM Reply

Does my idea just totally not work?


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

BBS Signature
Rudy
Rudy
  • Member since: Jan. 1, 2005
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to Looping Button? Uh...help?! Mar. 20th, 2008 @ 12:46 AM Reply

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
23450
23450
  • Member since: May. 28, 2003
  • Offline.
Forum Stats
Member
Level 27
Blank Slate
Response to Looping Button? Uh...help?! Mar. 20th, 2008 @ 12:48 AM Reply

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
El-Presidente
El-Presidente
  • Member since: Jun. 2, 2005
  • Offline.
Forum Stats
Member
Level 27
Blank Slate
Response to Looping Button? Uh...help?! Mar. 20th, 2008 @ 12:49 AM Reply

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

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


MY E-PENIS IS BIGGER THAN YOURS
8=================================>
...and this is my fag...

BBS Signature
Rudy
Rudy
  • Member since: Jan. 1, 2005
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to Looping Button? Uh...help?! Mar. 20th, 2008 @ 12:52 AM Reply

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
El-Presidente
El-Presidente
  • Member since: Jun. 2, 2005
  • Offline.
Forum Stats
Member
Level 27
Blank Slate
Response to Looping Button? Uh...help?! Mar. 20th, 2008 @ 12:55 AM Reply

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