3 Replies Latest reply on Sep 23, 2008 6:12 AM by Devendran

    var statement help

    dalseiden
      Hi, I'm making a menu for a website, but I'm having trouble with the buttons (wich is moviclips because of a motions it performs when rolled over).

      I want to tell the button(mc) that if it's allready at frame 4 (wich is the last fram in the motion tween) then it should not play again, but stay there.

      Could anyone write down the code to use, so I only need to repleace the moviclip names. (or as simple as possible)


      Regards from me.
        • 1. Re: var statement help
          Devendran Level 1
          Please check this code
          • 2. var statement help
            dalseiden Level 1
            Thank you.
            That worked almost perfect.
            I have tried to trix around abit with it, but i didn't get it right.

            What I probably should have said in the previous post is that the full statement should be:
            "if my_mc is at frame 1, the play frame 2,
            if my_mc is at frame 4, then dont play"

            Later i tell it to go back to frame 1 onRollOut (since frame 1 and 4 has the stop(); atched to them inside the mc).

            If the script you gave me does this, and no further script is needed. I probably have to se if there is other scripts that interfer (if that is possible, like if I have several my_mc.onRollOver scripts in various places)

            Thank you again, I find "learning bo doing, and failing, and trying to understand" the best way to learn things.
            • 3. Re: var statement help
              Devendran Level 1
              For using Multiple Movie With same effect You can create a function and assign it to RollOver and RollOut effects like the Code given. The Release out Side is required bcz some time They will press the Button and Will release it out side the button, we need to consider that as rollOut

              i hope that will work for you