;

PDA

Click to See Complete Forum and Search --> : gotoandStop syntax


talytech
05-09-2007, 09:30 PM
I'm trying to move to a frame on my main stage from a movie clip. Ex. I have a movie that has 4 frames. The 4th frame is named "Contact". I have a movie clip named "menu". Inside the MC I have 3 buttons (home,services,contact). When I click on contact, I want to go to the contact frame. How do I tell it to go to and stop at the contact frame from the movie clip?
This is what I have that doesn't work:

on(press){
root.gotoAndStop("contact")}

blanius
05-09-2007, 10:14 PM
_root.gotoAndStop("Contact") make sure you use the proper case.

Bob Hartzell
05-10-2007, 08:15 AM
I have my doubts that that will work. gotoAndStop method associated with a movie clip I believe cannot accept a frame label.

dniezby
05-10-2007, 03:07 PM
I'm trying to move to a frame on my main stage from a movie clip. Ex. I have a movie that has 4 frames. The 4th frame is named "Contact". I have a movie clip named "menu". Inside the MC I have 3 buttons (home,services,contact). When I click on contact, I want to go to the contact frame. How do I tell it to go to and stop at the contact frame from the movie clip?
This is what I have that doesn't work:

on(press){
root.gotoAndStop("contact")}

Well, there's a few things you can do. First, put this in your contact frame.

stop();


in your button's action put this:

on(press){
gotoAndPlay("contact");
}

That's all you need to do to get to your "contact" frame. And, like Bret says, the target is case sensitive.

This should work but if you want to make sure you can use the _root prefix.

_root.gotoAndPlay("contact");

talytech
05-10-2007, 06:04 PM
ok thanks ... it worked. dniezby .. thanks for you patience this time ... Do you know where I can get a tutorial on actionscript? And what version is Koolmoves using?

dniezby
05-11-2007, 12:13 AM
KM uses AS1

Tutorials can be found here. Many examples can be found on Koolexhcange.com and any number of websites. Macromedia Live Docs.

I learned 99% of my actionscripting right here.