PDA

View Full Version : gotoandstop(3) with movieclips?


whos_wee_dug
09-25-2003, 09:55 PM
Hi,

I've got a problem with my code which I can't explain. I have my flash stop at frame1 using stop(), I have a total of 3 frames in my Scene.

I have an movie clip that when you click it it should goto and stop at frame 3 but it doesnt work. here's the code for that movie clip:


on(press)
{
if (selected=="nothing")
{
}
else
{
gotoandplay(3);
}
}

Its not a problem with my IF statement, if I try:


on(press){
gotoandplay(3);
}


It still doesnt work. Please help!

Thanks,
whos_wee_dug.

Billy T
09-25-2003, 11:19 PM
on(press){
this.gotoAndStop(3);
}

whos_wee_dug
09-25-2003, 11:32 PM
Still doesn't work...

They are both keyframes, does this matter?

Billy T
09-25-2003, 11:41 PM
are you using MX?

whos_wee_dug
09-26-2003, 07:12 AM
yeh, I'm using Flash MX.

webguy
09-26-2003, 11:25 AM
um.. is your clip a button, or an MC?

Billy T
09-26-2003, 11:33 AM
and are you trying to send your button/mc to frame 3 or _root?

webguy
09-26-2003, 11:50 AM
can you gotoAndStop() a button?

Billy T
09-26-2003, 12:04 PM
no

unless its an mc ;)

Billy T
09-26-2003, 12:05 PM
lol what's that line in your footer from?

whos_wee_dug
09-26-2003, 03:24 PM
Its an MC and I'm putting this code into it:


on(press){
this.gotoAndStop(3);
}

But the frame doesnt move. It used to be a button but I changed it to a MC in the properties page. Iss it possible that its a bug in flash then? I'm gonna rewrite it as a MC from the start and c if it works then unless anyone can suggest wots wrong!

Cheers,

whos_wee_dug.

whos_wee_dug
09-26-2003, 03:33 PM
I'm rying to send it to frame 3 btw. :(

webguy
09-26-2003, 03:48 PM
how does yours, differ from mine?

attached:

webG

Billy T
09-26-2003, 10:29 PM
Originally posted by whos_wee_dug
It used to be a button but I changed it to a MC in the properties page.

there's your problem...

webguy
09-30-2003, 01:29 PM
oh, the quote is from Kid Rock's, Behind the Music that Sucks Flash animation that was available on UGO.com, can't find it now though. Was on MTV their for a bit.

webG