暴光效果——抄来的

      Flash进修 2004-12-17 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();
};
标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}