开发者

How can I create masking like this in AS3?

I've worked a little bit with masks in开发者_开发问答 AS3 but I'm not sure how I can do this with masks.

I have two swf files that I have imported onto the Library as MC's with class names.

One of the files is the start image and the other is the end image. The transition is a slide transition from the start image to the end image. You can think of the transition like in this example.

But is it possible to do a slide transition like this using two swf's and "slide transitioning" between them?


I found the answer.

Mask.graphics.beginFill(0xFF0000);
Mask.graphics.drawRect(x, y, some.width, some.height);

Image.mask = Mask;

Was pretty simple actually, if you addChild Image and Mask, then mask will make Image transparent and you can move Mask around as you please.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜