Mouse Events Inside Mask

Posted on 2008-11-19
Last Modified: 2013-11-11
I'm having trouble detecting mouse events on movie clips behind a mask. I remember coming across this problem in the past, but can't remember the solution. Any ideas?

Question by:pyromunky
    LVL 8

    Expert Comment


    Can you profide an example or piece of code?

    I have created a moviecliip layer (with movieclip) and a mask layer. When i mask the movieclip i can use...

    _root.myMovieClip_1.onPress = function(){

    _root.myMovieClip_1.onRelease = function(){

    ...and this works.


    Accepted Solution

    I ended up using a hit test on the mask clip instead of a rollOver event. Since the mask was covering everything else below it, any rollOver detection was automatically associated with the mask.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    YouTube: 'An error occurred please try again later' 5 1,023
    Google Chrome Blank White Screens 13 273
    Flash Slides/Presnetation 4 64
    bandwidth 5 62
    This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
    Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
    The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
    The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now