开发者

How to prevent showing MC when his _y coordinate becomes to the -100?

开发者 https://www.devze.com 2023-01-23 17:24 出处:网络
I have a problem when one B.swf file is loaded to another A.swf file. A.swf file size is 400x400. B.swf file size is 100x100.

I have a problem when one B.swf file is loaded to another A.swf file.

A.swf file size is 400x400.

B.swf file size is 100x100.

B file has a movie clip (MC) which is animated and position of this movie can be from Y:-100 to Y:200.

B file is loaded into the center (X:150, Y:150) of the A file.

When 开发者_运维技巧B file is loaded, then animation starts. I have a problem: I can see animated movie clip B out of B screen scope (for example: when B.swf file movie clip has _y = -100 I still can see that movie clip in A.swf). I am expecting that movie clip will not be shown if Y position becomes negative.

Maybe someone has an advice how I could prevent B.swf file’s movie clip appearing on A.swf file?

Cheers, Ramunas


You can use a mask to hide the parts that are not to be visible.

In your example, I guess the best way would be to let B have a 100x100 mask, that would mask out everything outside that area.

0

精彩评论

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

关注公众号