A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: force mouse activity of button under a movie clip

  1. #1
    Senior Member
    Join Date
    Nov 2004
    Posts
    110

    force mouse activity of button under a movie clip

    hi, I have an invisible movieclip over some buttons/images. I have it so that on mouse over that invisible button the images start panning from one to the next. The thing is that these images/buttons are supposed to be clickable, but with the invisible movieclip on top I just can't do that. Is there a way to force mouse activity on the buttons/images?

    I've tried simply adding a movieclip to the back of the buttons/images and make the MOUSE_OVER listener on the whole movieclip that holds all the images but for some reason whenever the mouse goes from one image to the next it pauses the movement and then continues it, which looks like it identifies different movieclips (images/buttons AND the mc in the back) and re-does the MOUSE_OVER listener for each of them instead of the whole movieclip that holds all of them.. annoyingly odd..

    anyone? appreciate it!
    thanks in advance!
    T

  2. #2
    Señor Member Mavrisa's Avatar
    Join Date
    Oct 2005
    Location
    Canada
    Posts
    506
    Set the mouseEnabled property of the invisible movieclip to false, and if that doesn't work, try mouseChildren instead/as well. Also, is the .visible property set to false or is alpha just 0?
    Haikus are easy
    But sometimes they don't make sense
    Refrigerator

  3. #3
    Senior Member
    Join Date
    Nov 2004
    Posts
    110
    well I can't set either the mouseEnabled or its children to false, otherwise I won't have action on that invisible movieclip, which I need to have. But at the same time I wanted to have the buttons that are underneath to be clickable as well.

    If you go to: www.lemos-inc.com/new/index.html and roll over the area on the bottom left corner you'll see what I'm referring too. I basically have an invisible mc that makes the bar go up and/or down according to the mouseY position. At the same time I wanted the images in the back to be clickable, since I will eventually need that to happen.

    As for your question, the invisible mc has its alpha set to 0.. Would it help if I used mc.visible = false; ?

  4. #4
    Señor Member Mavrisa's Avatar
    Join Date
    Oct 2005
    Location
    Canada
    Posts
    506
    mc.visible=false removes mouse activity from the movieclip as well so that wouldn't work. Try using the mouseMove event and hitTestAtPoint on the invisible movieclip but put it BEHIND the other clips. when the mouse (the location of the point) hits the movieclip, it should do what you want.
    The other way I would try would be to use actionscript with a mouseMove event listener to test if the mouse is in the right spot. You can have a variable called open:Boolean which would tell you whether the menu has been opened so the mouse can move up further without closing it down.

    Hope that helps.
    Haikus are easy
    But sometimes they don't make sense
    Refrigerator

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center