PDA

View Full Version : cut of image with bezier curve ..



secret007
December 30th, 2009, 06:18 AM
Hi,

i have a bezier curve that is generated dynamically now i want to mask an image with it to produce a cut of face functionality just like in elfyourself.com or in jibjab.com anyone have any idea about how they do the cut of face functionality .. ??

IQAndreas
December 30th, 2009, 01:51 PM
Well, if you want to mask an item, you can create a new Sprite (or MovieClip) to serve as the mask. Then, draw the beizer curve onto this.

Finally, choose your image to "cut out of" and apply the mask to it. Place the image you want to shine through under the curve under the masked image. Voila...

Just google "as3 create mask dynamically" or something, and you should get helpful results.


Or perhaps the easiest way is just to have a PNG with the masked area set to an alpha of zero. Any decent image editing program will do this.