2004/12/17 | 暴光效果——抄来的
类别(Flash进修) | 评论(2) | 阅读(554) | 发表于 15:58
//-------------- 给MovieClip添加 _brightOffset 属性 ---------------
MovieClip.prototype.setBrightOffset = function(offset) {
    (new Color(this)).setTransform({rb:offset, gb:offset, bb:offset});
};
MovieClip.prototype.getBrightOffset = function() {
    return (new Color(this)).getTransform().rb;
};
with (MovieClip.prototype) {
    addProperty("_brightOffset", getBrightOffset, setBrightOffset);
}
//----------------------------------------------------------------
var tween = new mx.transitions.Tween(mc, "_brightOffset", mx.transitions.easing.Regular.easeOut, 0, 255, 1, true);
this.onMouseDown = function() {
    tween.yoyo();
};
0

评论Comments