A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Movie clip buttons not directing to correct frames.

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    10

    Question Movie clip buttons not directing to correct frames.

    I'm having trouble with some script on some movie clips.

    It's supposed to cause each of five movie objects to correspond and go to a different named frame when they are clicked. The problem is that regardless of which one is clicked, it always goes to "animation." I tested it out by changing the name of the animation frame. The result was that it then always went to the "publication" frame. It would seem that it goes to the last valid named frame in the script.

    Actionscript Code:
    stop();

    Photo_Button.onMouseUp = function() {
        gotoAndPlay("photo");
    }

    Design_Button.onMouseUp = function() {
        gotoAndPlay("design");
    }

    Drawing_Button.onMouseUp = function() {
        gotoAndPlay("drawing");
    }

    Publication_Button.onMouseUp = function() {
        gotoAndPlay("publication");
    }

    Animation_Button.onMouseUp = function() {
        gotoAndPlay("animation");
    }

    Is this just a small syntax or separation I'm missing or am I using the wrong code all together?

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Try using 'onRelease', instead of 'onMouseUp'

  3. #3
    Senior Member
    Join Date
    Jun 2008
    Posts
    549
    The 'onMouseUp' is the problem as it detects when the mouse is released instead of when it is clicked. You should use the 'onRelease' as mentioned above.

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