5 Replies Latest reply on Mar 12, 2010 11:01 AM by Ned Murphy

    Button Dreamweaver Help


      Ok I am completely lost with buttons.

      Basically i have a MovieClip on the main timeline, and inside that movieclip i have 6 buttons (btn_1 etc) and another movieclip (mc_1).


      Now, when the mouse rollsover one button i want it to play the movieclip called (mc_1) but when i click on the button i want it to go to "page1.html"


      can this be done, and any help on how would be gratefully appreciated. Thank guyss!! =)

        • 1. Re: Button Dreamweaver Help
          Ned Murphy Adobe Community Professional & MVP

          GIve your button an instance name via the Properties panel.  Then in the timeline, on an actions layer, in the same frame as where the button is, assign it some event handling code.  Let's say you name it "btn1".  The code in the actions layer would be...


          btn1.onRollover = function(){

               mc_1.play();  // or mc_1.gotoAndPlay(2);



          btn1.onRelease = function(){



          1 person found this helpful
          • 2. Re: Button Dreamweaver Help
            Man213Ba213rt123 Level 1

            mate that sounds like the code i was looking for. However the MC_1 keeps playing before i even rollover!!


            i have tried putting a "stop;" inside the MC and on the timeline with the MC on but it doesnt stop it...

            any ideas on this?


            two others things as well if any1 can help...


            i only want the MC to play once.... and stop at the end of the MC if you know what i mean (on the last frame kind of thing)




            i dont know if this can be done but if i rollout of the button, can the MC reverse back - instead of like just stopping completely midway?

            i hope you understand what i mean.


            Thanks so much for your help Mr N. Murphy =)!

            • 3. Re: Button Dreamweaver Help
              Ned Murphy Adobe Community Professional & MVP

              If the movieclip is independent of the button, and it is a timeline animation, it should if you place a stop command in its timeline.  If it is just playing thru then you may have some other error in the file... sometimes errors in files cause things to just run uncontrollably.


              To stop it at the end, you put a stiop at the end.


              To make it play backwards involves initiating and onEnterFrame cycle wherein you continually can prevFrame() until you get back to whatever _currentframe value you intend.  If you don't understand that, try Googling "AS2 reverse animation" or similar terms

              • 4. Re: Button Dreamweaver Help
                Man213Ba213rt123 Level 1

                cheers nice stuff dude, thanks loads for your help.

                i got a new problem if you can help though to do

                with the same thing.... =)



                • 5. Re: Button Dreamweaver Help
                  Ned Murphy Adobe Community Professional & MVP

                  You're welcome.  I see your other problem has been sorted out