如何使用动作动态屏蔽我的flash动画,在4个角落创建一个5像素的圆形蒙版? (角落应该是透明的,其余部分应该是可见的)
谢谢!
答案 0 :(得分:4)
可能就是这么简单。在Flash中创建一个圆角矩形,并将其命名为myMovie。
面膜
mask = myMovie;
绘制圆角矩形以在舞台上制作电影
//550x400 stage
var roundRect:Shape = new Shape();
roundRect.graphics.beginFill(0x006600, 1);
//stage width, stage height, width of rectangle, height of rectangle, ellipse width, ellipse height
roundRect.graphics.drawRoundRect(125, 75, 300, 200, 25, 25);
addChild(roundRect);
//mask
mask = roundRect;
将面具和电影放在舞台'符号上,类名为Rr和Ym'
//550x400 stage
//put mask on stage
var mm:MovieClip = new Rr;
addChild(mm);
//position on stage
mm.x = stage.stageWidth/4;
mm.y = stage.stageWidth/4;
//mask
mask = mm;
//put movie on stage
var yourClip:MovieClip = new Ym;
addChild(yourClip);
//position on stage
yourClip.x = stage.stageWidth/4;
yourClip.y = stage.stageWidth/4;