5 Replies Latest reply on Apr 20, 2007 1:04 PM by kglad

    onPress Issue

    BeniRose Level 1
      I'm having a problem with my onPress being triggered. I have a parent MC, let's hypothetically call it "sections". It has a bunch of MCs in it, let's say by the name of "section_1", "section_2", "section_3". On the first frame of the first and only layer inside my parent MC (sections) I have a bunch of onPress code for my children section. It worked great until I added an onPress code for my parent MC on my _root timeline. Now only my parent's onPress code is being triggered, and the onPress for the children aren't. Is there anyway to get these both to be triggered, perhaps with a mouse listener?
        • 1. Re: onPress Issue
          kglad Adobe Community Professional & MVP
          the parent movieclip is intercepting mouse events so the child movieclips do not detect mouse events.

          to remedy, you must either code for the youngest generation that needs mouse handlers or use a hitTest for one of the generations.
          • 2. Re: onPress Issue
            raydowe
            I'm having a similar problem, where a "play_mc", "stop_mc", "pause_mc" are nested inside a "controls_mc" to fade everything in and out on controls_mc.onRollOver.

            Could you further explain the hitTest and "coding for the youngest generation"? It will be greatly appreciated.
            • 3. Re: onPress Issue
              kglad Adobe Community Professional & MVP
              hitTest technique:

              • 4. Re: onPress Issue
                Level 7
                also see:
                http://www.senocular.com/flash/tutorials/buttoncapturing/



                "BeniRose" <webforumsuser@macromedia.com> wrote in message
                news:f0620j$p4c$1@forums.macromedia.com...
                > I'm having a problem with my onPress being triggered. I have a parent MC,
                > let's
                > hypothetically call it "sections". It has a bunch of MCs in it, let's say
                > by
                > the name of "section_1", "section_2", "section_3". On the first frame of
                > the
                > first and only layer inside my parent MC (sections) I have a bunch of
                > onPress
                > code for my children section. It worked great until I added an onPress
                > code for
                > my parent MC on my _root timeline. Now only my parent's onPress code is
                > being
                > triggered, and the onPress for the children aren't. Is there anyway to get
                > these both to be triggered, perhaps with a mouse listener?
                >


                • 5. Re: onPress Issue
                  kglad Adobe Community Professional & MVP
                  except for the additional wordiness and graphics in sencoluar's article, is there any difference between his article and my post?