Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

Closed Thread
Results 1 to 3 of 3
  1. #1

    Default if MC's current frame is 1, gotoandplay(2), else if

    i'm doing a menu that plays MC's.

    when you hit the home button, it should do two things:

    1) determine if home_mc's current frame is 1, if so, send to frame 2.
    2) if other mc's are on frame 5, send them to frame 15.

    i've been using the following code, but for some reason it's not working on my current project, so i guess i should find a solution using IF, ELSE IF.

    ///home button
    on (release) {
    frame = (_root.home_mc._currentframe == 1) ? 2 : 4;
    _root.home_mc.gotoAndplay(frame);


    frame = (_root.co_mc._currentframe == 1) ? 19 : 15;
    _root.co_mc.gotoAndplay(frame);

    }




    any help greatly appreciated

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2

    Default

    and here we go:


    on (release) {
    if (_root.home_mc._currentframe == "1") {
    _root.home_mc.gotoAndPlay(2);
    } else if (_root.home_mc._currentframe == "5") {
    _root.home_mc.gotoAndPlay(4);
    }

    if (_root.co_mc._currentframe == "5") {
    _root.co_mc.gotoAndPlay(15);
    }
    }

  4. #3
    Join Date
    May 2004
    Location
    U.S.A.
    Posts
    2,890

    Default

    Sometimes a little experimenting is all you need to figure things out for yourself. Well done

    Regards
    NTD
    A mind once stretched by a new idea never regains its original dimensions.
    - Oliver Wendell Holmes

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Variable buttons - gotoandPlay
    By allgood in forum Flash Scripting
    Replies: 9
    Last Post: 11-04-2006, 01:32 AM
  2. gotoandplay
    By tragic in forum Newbies
    Replies: 0
    Last Post: 02-10-2006, 05:52 AM
  3. gotoAndPlay in buried movie clips
    By aussie01 in forum Flash Scripting
    Replies: 2
    Last Post: 12-13-2005, 01:09 PM
  4. Retrieve current frame object
    By seldrick in forum Flash Scripting
    Replies: 4
    Last Post: 07-26-2005, 07:11 PM
  5. current frame retrieval within movieclip control script
    By dougdayhoff03 in forum Advanced Flash
    Replies: 3
    Last Post: 12-23-2003, 10:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial