A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: button inside MC

  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    14

    button inside MC

    Maybe I did not know how to search, but I didn´t find the answer to my question.
    I know it´s simple but I`m stuck.
    I have a MC with code:

    on(release){
    gotoAndStop(2);
    }

    It´s working fine.

    Inside frame 2 of MC I put a button with code:

    on(release){
    gotoAndStop(1);
    }

    This should take me to 1st frame of MC, right?

    But the button doesn´t work.
    Nothing happens.
    I changed its color when mouse is over and down to check if the button has functionality but it remains as it is. No color change, although the mouse pointer changes to hand when it hits the button area.

    Strange is If I change the code in MC to:

    on(release){
    play();
    }

    I go to MC`s frame 2 as well, but this time the button works fine.

    Any idea?

    Thanks in advance.

  2. #2
    Member
    Join Date
    Aug 2012
    Posts
    55
    try putting gotoAndPlay(2) in the first one

  3. #3
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi.

    try:
    Code:
    this.gotoAndStop(1);
    or
    Code:
    _root.MC.gotoAndStop(1);

  4. #4
    Junior Member
    Join Date
    Jul 2012
    Posts
    14
    Thanks for reply. I don´t know what, but there was a glitch in that MC. I made a new one and solved the problem.
    Thanks again.

Tags for this Thread

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