3 Replies Latest reply on Oct 13, 2007 9:52 AM by clbeech

    Scrolling banner - links don't work

    Walter Elias Level 2
      I have a scrolling banner which consists of 3 banners patched together. Thus, banner1, banner2 and banner 3 are lined up inside the movie clip "banner".

      I have a simple script for endless looping during mouseOver. When it is scrolling, the onRelease links don't work. When I comment out the scrolling script, the links do work. What in blazes am I doing wrong?

      I'm working in AS 2.0

        • 1. Re: Scrolling banner - links don't work
          clbeech Level 3
          Hey Walter, it's not that your doing anything wrong :) But here's the deal, the on handlers on the parent 'banner' are overriding, or kind of 'covering up' the handlers for the banner children. This is typical, like putting a button inside a button the second button wont work, and the first or top level handlers are the only ones that receive events.

          So one solution would be to leave the handlers on the parent level 'banner' MC, and add an onPress to that level, then use a hitTest method to determine which banner was clicked, kind like this:
          • 2. Re: Scrolling banner - links don't work
            Walter Elias Level 2
            (sound of sharp slap on forehead)
            Y'know something? I haven't used ActionScript for around 4 months. It's amazing how stupid one gets. Thanks for re-teaching me.

            Thanks to your reminder, I came up with an alternate solution of just using _ymouse values to set the horizontal scrolling.

            • 3. Re: Scrolling banner - links don't work
              clbeech Level 3
              LOL!!!! yeah, I wondered what was up!!! ;)

              you're welcome, nice and clean scrolling algorithm there now as well :)