flash中简单的动态创建遮罩方法
[ 2007-04-14 22:24:17 | Author: liuhuan ]
Quote
this.mask = this.createMask(this.maxWidth, this.mcText1._height, 100);
this.mcText.setMask(this.mask1);
function createMask(w, h, level) {
var mask = this.createEmptyMovieClip("mask"+level, level);
with (mask) {
moveTo(0, 0);
beginFill(0);
lineTo(w, 0);
lineTo(w, h);
lineTo(0, h);
lineTo(0, 0);
endFill();
}
return (mask);
}
this.mcText.setMask(this.mask1);
function createMask(w, h, level) {
var mask = this.createEmptyMovieClip("mask"+level, level);
with (mask) {
moveTo(0, 0);
beginFill(0);
lineTo(w, 0);
lineTo(w, h);
lineTo(0, h);
lineTo(0, 0);
endFill();
}
return (mask);
}
Comments Feed: http://www.liuhuan.com/blog/feed.asp?q=comment&id=747
There is no comment on this article.
You can't post comment on this article.