3 Replies Latest reply on Sep 10, 2006 10:06 AM by WebXperience

    Calling multiple buttons on a timeline in a movieClip

    Level 7
      I have a MC with individual buttons on a time line.
      The script holds the frame on frame one for 3 seconds then moves to the next
      frame
      and stops there for 3 seconds and then moves down the line.

      This is like a banner that changes advertisers every three seconds.
      I can call the first button from the main timeline but no other buttons
      work.

      I've tried several options - I can do it in Director but am unable to do it
      with actionScript.

      Here is the code:
      stop()
      partners_mc.brown_but.onRelease=function(){
      getURL(" http://www.hvac-consultants.com", "_blank");
      }
      partners_mc.bfl_but.onRelease=function(){
      getURL(" http://www.bodyforlife.com", "_blank");
      }

      Thanks in advance for any help in this area.

      Tim


        • 1. Re: Calling multiple buttons on a timeline in a movieClip
          WebXperience Level 1
          You've defined the onRelease functions ok, it seems. But, I don't see how your moving from one button to the next. Are the buttons defined as MovieClip Objects or as Buttons? Are the "buttons" contained in another MovieClip Object or are they on the Main Timeline?
          • 2. Re: Calling multiple buttons on a timeline in a movieClip
            Level 7
            The movieClip in on the main timeline. The buttons are inside the movieClip
            with
            coding to move along the time line ever 3 seconds. The buttons are defined
            in the
            MC as buttons. Depending upon which button is visible, I want
            to be able to click that button and have the script in the main timeline to
            know
            which button I'm using.

            Here is a link to the web site which is under development - the movieClip
            is
            on the right hand side under Partners.

            www.familyrx.org

            Thanks,
            Tim


            > You've defined the onRelease functions ok, it seems. But, I don't see how
            your
            > moving from one button to the next. Are the buttons defined as MovieClip
            > Objects or as Buttons? Are the "buttons" contained in another MovieClip
            Object
            > or are they on the Main Timeline?
            >


            • 3. Re: Calling multiple buttons on a timeline in a movieClip
              WebXperience Level 1
              From looking at your site, it seems that the buttons are accually defined as buttons and not as MoviClip instances. They seem to be already responsponding to click events which is why the text change occurs.
              Now, though current trends in ActionScript programming advise against placing code on buttons, since you seem to have already written extensive code here, my suggestion would be to place the action code into the function that is causing the text to change. Granted you would have to repeat that code on each one of the buttons. Which would be avoided if all the code was placed in one place.