A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: gotoandStop syntax

  1. #1
    Senior Member
    Join Date
    Mar 2004
    Location
    Upper Marlboro, MD
    Posts
    146

    gotoandStop syntax

    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")}

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    _root.gotoAndStop("Contact") make sure you use the proper case.

  3. #3
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    I have my doubts that that will work. gotoAndStop method associated with a movie clip I believe cannot accept a frame label.

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    Quote Originally Posted by talytech
    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.

    Code:
    stop();

    in your button's action put this:

    Code:
    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.

    Code:
    _root.gotoAndPlay("contact");
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  5. #5
    Senior Member
    Join Date
    Mar 2004
    Location
    Upper Marlboro, MD
    Posts
    146
    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?

  6. #6
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    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.
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center