3 Replies Latest reply on Nov 3, 2007 4:31 PM by designut

    button and movie clip actionscript problem

      Hi - and help! I would REALLY appreciate some actionscript advice! I've tried everything I can think of!

      The site I'm working on is at http://www.designvine.net

      The problem is in Scene 2, after the intro animation, which has the buttons and site pages. Each button when selected takes you to a movie clip which is in the main timeline of Scene 2. Each movie clip is a site page.

      I have used MC buttons, because when I select a button I'd like the button to change color to a different color (red) and stay that color until another button is selected, i.e. to stay in the down state until the next button selection.

      The script placed on each button is:

      on (release){

      on (rollOver){
      if (this._currentframe <> 3)

      on (rollOut, releaseOutside){
      if (this._currentframe <> 3)

      I have this script on a separate layer for the movie clips:

      function resetButtons(){

      Is maybe my button script conflicting with my script for taking you to each movie clip?
      When I delete the last part of the script (homebutmc.onRelease, etc........) the button states work perfectly, but I don't go to the movie clips.
      And then when I add the last part of the script (homebutmc.onRelease, etc....) I can go to every movie clip and it plays, but the button states don't work.

        • 1. Re: button and movie clip actionscript problem
          kglad Adobe Community Professional & MVP
          that's really an unnecessary mess. you shouldn't have mouse handlers attached to your movieclips and mouse handlers for those movieclips also attached to a frame.

          1. remove the handler attached to your movieclips.
          2. only use the handlers attached to a frame.
          3. prefix all your methods with the appropriate movieclip instance name or path/name.
          • 2. Re: button and movie clip actionscript problem
            designut Level 1
            Hi Kglad,
            Thanks so much for helping me out. As a relative actionscript beginner please excuse my poor use of actionscript terminology below!

            I don't have any script placed on the movie clip itself. The script for the movie clips (that starts with "function resetButtons etc...") is on a separate Actions layer to the movie clips. Is that ok?
            The buttons are called"homebutmc", "whatbutmc", etc. and I'm telling them to go to and play frame 68, 100, etc. Frames 68, 100 etc. hold each MC. Do you mean I should I change the frame #s 68, 100 etc. to the MC name instead?
            • 3. Re: button and movie clip actionscript problem
              designut Level 1
              Problem solved -rookie mistake - I had actionscript for the buttons missing on some frames, thus the button states didn't work.