dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Newbie: Buttons in Movie Clips

  1. #1
    Junior Member
    Join Date
    Sep 2004
    Posts
    3

    Newbie: Buttons in Movie Clips

    hey people

    I need help with buttons in movie clips, this problem has been buggin me 4 awhile n i cant seem to fix it.

    i use this basic code for most of my buttons

    on (release) {
    gotoAndPlay(1);
    }

    Now this is all fine if the place i wanna get to is in the same movie clip, but it aint. this is my prob:

    say i have my main movie clip. lets call it 'main'. Inside main i have another movie clip, called 'othermc'. I want a button thats inside the 'othermc' to make the 'main' movie clip go to another frame.

    any help would be great




  2. #2
    Left-Handed Flash User mickbrit55's Avatar
    Join Date
    Nov 2003
    Location
    NJ USA
    Posts
    1,375
    Hiya

    This is a common problem, but easily fixed. You need to use _root to target the main timeline :

    code:
    on(release) {
    _root.gotoAndPlay(5);
    }



    You can also use _root.gotoAndStop(), _root.prevFrame() etc. So long as you use _root you will be good to go

    Mick

  3. #3
    Junior Member
    Join Date
    Sep 2004
    Posts
    3
    thanks alot, that really helps.

    this is going to help out heaps

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    May I also suggest you start targeting frame labels rather than frame numbers, it's much less error prone!

    Check my post in this thread...

    http://www.flashkit.com/board/showth...hreadid=584159

  5. #5
    Junior Member
    Join Date
    Sep 2004
    Posts
    3
    ok, thanks for the advice

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