//-------------- 给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();
};
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();
};
回复Comments
作者:
{commentrecontent}