2011-03-18 76 views
1

是否有办法让动画片段的一部分变为透明?使用动作即是。 我想在动画片段中创建'洞',以便我可以看穿它。在Flash动画片段中应用透明圆形

如果需要,我想我可以将动画片段更改为一个精灵,如果这使得它更容易,但我不熟悉闪光灯,所以我需要学习正确的方法来做这样的事情。

我在此先感谢。

回答

3

您也可以在blendMode选择退房BlendMode.ERASEDisplayObject:​​

0

这应该做你需要什么,没有什么太花哨要求:

var s:Sprite = new Sprite(); // create a sprite to holder your image. 
s.addChild(myImage); // add your image 
addChild(s); // add your sprite to the stage. 

var masker:Sprite = new Sprite(); // create a second sprite to be the mask 
masker.graphics.beginFill(0x000000); // draw the shapes you want to use as masks 
masker.graphics.drawCircle(50, 50, 100); // ...for instance, this circle 
masker.graphics.endFill(); 
addChild(masker); // add your masker to the stage 

s.mask = masker; // set the mask property of your image holder to be the masker 

这应该做你需要的。如果您还有其他问题,请告诉我!