Forum Topic: Button problems :P

(113 views • 9 replies)

This topic is 1 page long.

<< < > >>
Beaten

BuLhaNuL

Reply To Post Reply & Quote

Posted at: 2/8/09 11:41 AM

BuLhaNuL NEUTRAL LEVEL 05

Sign-Up: 10/07/08

Posts: 11

I´m doing a flash once again. For a class work, once again. But that´s not the point xD

Let´s see, i have to do some buttons things, with orders like goto scene, etc.

The flash has a bunch of movie clips that must lead to other scenes. The problem is, i am doing one part of the flash inother flash archive, and i have a movieclip with a button, leading to "goto scene 2 frame 1" The thing is, when pushing the button, the animation goes back to the first scene, instead going to where it should be going. >_<

And that´s the problem... Am i doin´ it wrong?

"Resurrect, you idiot, resurrect! Is it money? Is that what you want!?"


None

BuLhaNuL

Reply To Post Reply & Quote

Posted at: 2/8/09 04:56 PM

BuLhaNuL NEUTRAL LEVEL 05

Sign-Up: 10/07/08

Posts: 11

Uuh... Help needed, please, thankyou^^

"Resurrect, you idiot, resurrect! Is it money? Is that what you want!?"


None

Kirk-Cocaine

Reply To Post Reply & Quote

Posted at: 2/8/09 05:09 PM

Kirk-Cocaine EVIL LEVEL 36

Sign-Up: 08/17/03

Posts: 17,814

Are you saying you're using a MC as a button? If you are that's your problem, as you can't reference scenes from within Movieclips. You can just use a standard button but if you need to use a MC you can either use a frame label or the just the frame number directly. For example, if Scene 1 has 5 frames you can go to Scene 2 frame 1, with gotoAndStop(6);

No throwing gets done that day at all, just because I had the gall to point out the simple truth that lasses can't throw, it makes you sick, it really does.

BBS Signature

None

BuLhaNuL

Reply To Post Reply & Quote

Posted at: 2/8/09 06:01 PM

BuLhaNuL NEUTRAL LEVEL 05

Sign-Up: 10/07/08

Posts: 11

No, that´s not it. I put a button inside the movie clip, so when the animation is over and you have to choose what to do next they will appear. They´re clicable, despite being inside a MC, but the actionscript code doesn´t work like it should, and it goes back to the beginning of the flash :P

Yeah, i should ask my teacher, but he is also clueless. And well... He suck a bit in flash knowledge xD

Thanks for your time though ^__^

"Resurrect, you idiot, resurrect! Is it money? Is that what you want!?"


None

CrustySheet

Reply To Post Reply & Quote

Posted at: 2/8/09 06:06 PM

CrustySheet LIGHT LEVEL 03

Sign-Up: 05/03/06

Posts: 532

At 2/8/09 06:01 PM, BuLhaNuL wrote:

They´re clicable, despite being inside a MC, but the actionscript code doesn´t work like it should, and it goes back to the beginning of the flash :P

looking at the code oy provided i'd say theres no problems at all


None

BuLhaNuL

Reply To Post Reply & Quote

Posted at: 2/8/09 06:23 PM

BuLhaNuL NEUTRAL LEVEL 05

Sign-Up: 10/07/08

Posts: 11

Well, that´s the problem... Everything looks fine and correct, but it goes nuts instead following the AC order.

It this, by the way:

on (press, release) {
gotoAndPlay("Escena 2", 1);
}

It´s in spanish xD I know it´s a very simple code, but it´s just that i don´t know what´s the problem...

Thanks for your help!

"Resurrect, you idiot, resurrect! Is it money? Is that what you want!?"


None

Kirk-Cocaine

Reply To Post Reply & Quote

Posted at: 2/8/09 06:37 PM

Kirk-Cocaine EVIL LEVEL 36

Sign-Up: 08/17/03

Posts: 17,814

At 2/8/09 06:01 PM, BuLhaNuL wrote: No, that´s not it. I put a button inside the movie clip...

That's exactly it. You can't reference Scenes from within MovieClips and your button is in a MovieClip.

No throwing gets done that day at all, just because I had the gall to point out the simple truth that lasses can't throw, it makes you sick, it really does.

BBS Signature

None

jds74

Reply To Post Reply & Quote

Posted at: 2/8/09 07:51 PM

jds74 NEUTRAL LEVEL 01

Sign-Up: 03/21/08

Posts: 822

At 2/8/09 06:23 PM, BuLhaNuL wrote: Well, that´s the problem... Everything looks fine and correct, but it goes nuts instead following the AC order.

It this, by the way:

on (press, release) {
gotoAndPlay("Escena 2", 1);
}

It´s in spanish xD I know it´s a very simple code, but it´s just that i don´t know what´s the problem...

Thanks for your help!

on (press, release) {
_root. gotoAndPlay("Escena 2", 1);
}

try that, if it works, ill explain it


None

BuLhaNuL

Reply To Post Reply & Quote

Posted at: 2/9/09 11:22 AM

BuLhaNuL NEUTRAL LEVEL 05

Sign-Up: 10/07/08

Posts: 11

At 2/8/09 06:37 PM, Kirk-Cocaine wrote:
At 2/8/09 06:01 PM, BuLhaNuL wrote: No, that´s not it. I put a button inside the movie clip...
That's exactly it. You can't reference Scenes from within MovieClips and your button is in a MovieClip.

Oh, sorry, i readed your first post wrong ^__^U

So that´s the thing... Well, is there any other way to make a button appear at the end of the MC? It will be odd to have a button there when you still don´t know what´s going on...

At 2/8/09 07:51 PM, jds74 wrote:
on (press, release) {
_root. gotoAndPlay("Escena 2", 1);
}

try that, if it works, ill explain it

on (press, release) {
_root. gotoAndPlay("Escena 2", 1);
}

No, it didn´t work U_U thanks for your time, tough ^__^

"Resurrect, you idiot, resurrect! Is it money? Is that what you want!?"


None

Kirk-Cocaine

Reply To Post Reply & Quote

Posted at: 2/9/09 11:47 AM

Kirk-Cocaine EVIL LEVEL 36

Sign-Up: 08/17/03

Posts: 17,814

At 2/9/09 11:22 AM, BuLhaNuL wrote: So that´s the thing... Well, is there any other way to make a button appear at the end of the MC? I

You could either modify your code in the ways I've already suggested, or you could move the button off stage and then move it back when the MC reaches it's last frame.

_root.myBTN._x = 100;
_root.myBTN._y = 100;

etc

No throwing gets done that day at all, just because I had the gall to point out the simple truth that lasses can't throw, it makes you sick, it really does.

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 10:27 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!