Hi kirupa
I’m building a flash web site, this site contain images in 5 pages,
i want to do an effect when rollover of any image ( make image brightness
100 and fade to 0 ).
many thx
Hi kirupa
I’m building a flash web site, this site contain images in 5 pages,
i want to do an effect when rollover of any image ( make image brightness
100 and fade to 0 ).
many thx
convert them to movieclips and tween them?
For a movie clip with instancename mc:
//Color.setBrightness by Robert Penner June 2001 - www.robertpenner.com
Color.prototype.setBrightness = function(bright) {
var percent = 100 - Math.abs(bright);
var offset = 0;
if (bright > 0) {
offset = 256 * (bright / 100);
}
var trans = new Object();
trans.ra = trans.ga = trans.ba = percent;
trans.rb = trans.gb = trans.bb = offset;
this.setTransform(trans);
};
mc.colour = new Color(mc);
mc.brightNum = 0;
mc.brightSpeed = 5;
mc.onRollOut = function():Void {
this.onEnterFrame = function():Void {
if (this.brightNum > 0 + this.brightSpeed) {
this.brightNum -= this.brightSpeed;
} else {
this.brightNum = 0;
delete this.onEnterFrame;
}
this.colour.setBrightness(this.brightNum);
};
};
mc.onRollOver = function():Void {
this.onEnterFrame = function():Void {
if (this.brightNum < 100 - this.brightSpeed) {
this.brightNum += this.brightSpeed;
} else {
this.brightNum = 100;
delete this.onEnterFrame;
}
this.colour.setBrightness(this.brightNum);
};
};
you could make functions out of that
Thx so much
i convert photo to movieclip with instancename mc but it’s not working,
excuse me i’m newbie to actionscript, please take a look at fla…
www.geocities.com/dutch_delusion/mc.fla
I'd greatly appreciate it.
:: Copyright KIRUPA 2024 //--