Skip navigation
Currently Being Moderated

Mouse cursor moving mask over another image.

May 13, 2012 8:44 AM

Hi, Is it possible to have where the Mouse cursor is on the page moving mask over another image. Imagine a black screen with a star cut out of the middle(where the cursor is) and u can see the image behind.

 

Any examples on how to do this?

Can it be done in html instead?

 
Replies
  • Currently Being Moderated
    May 13, 2012 12:11 PM   in reply to nikos101

    Create the mask and the background as movieclips and then assign the mask as the mask property of the bacground movieclip... as in background.mask = msk (where msk is the instance name of the mask).

     

    Then assign a MOUSE_MOVE event listener to the mask and in the event handler for that listener have its x and y properties assigned to be the mouseX and mouseY properties

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points