0 Replies Latest reply on Feb 1, 2010 7:27 AM by wyattbiker

    Bitmap rounded area transparency

    wyattbiker

      I need to slide an image over another image. The bottom image is a picture. The top image is a ring with a thick solid border. I want to move the ring over the image like a magnifying glass. My problem is how do I make the ring have a transparent circular area so when it moves it shows the image below?

       

      I was planning to use bitmap threshold() but it the sourceRect (e.g. the area for transparency) parameter is rectangular. Does anyone know if this will work with a rounded rectangle? Or is there some other trick I should look at.

       

      Thanks

       

      public function threshold(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, operation:String, threshold:uint, color:uint = 0, mask:uint = 0xFFFFFFFF, copySource:Boolean = false):uint