# brightOffset

**URL:** <https://forum.kirupa.com/t/brightoffset/119883>\
**Category:** Uncategorized\
**Created:** [August 18, 2004, 8:31pm UTC](https://forum.kirupa.com/t/brightoffset/119883 "2004-08-18T20:31:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nessie](https://avatars.discourse-cdn.com/v4/letter/n/e274bd/32.png) [@nessie](https://forum.kirupa.com/u/nessie)\
**Post date:** [August 18, 2004, 8:31pm UTC](https://forum.kirupa.com/t/brightoffset/119883/1 "2004-08-18T20:31:26Z")

</div>

I´w got this code and i wana put a “brightOffset” code here instead how do i do :h: help!

[http://www.mikaelnaslund.com/Forum/m1.fla](http://www.mikaelnaslund.com/Forum/m1.fla)

* * *

Stage.scaleMode = “noScale”;  
Stage.align = “tl”;  
mc.\_alpha = 0;  
onLoad = function () {  
mc.\_width = Stage.width;  
mc.\_height = Stage.height;  
};  
this.onEnterFrame = function() {  
change();  
};  
Stage.addListener(this);  
\_global.change = function() {  
mc.\_width = Stage.width;  
mc.\_height = Stage.height;

```
function fadeIn () {
if (mc._alpha &lt; 100) {
    mc._alpha += 1
    //The higher the number the faster it fades
} else {
    clearInterval (time)
}

```

}  
time = setInterval (fadeIn, 50)

};

* * *

brightOffset();  
}  
};  
}

MovieClip.prototype.brightOffset = function(){  
this.c = new Color(this.containerMC)  
this.o = {rb:200,gb:200,bb:200}  
this.up = true  
this.onEnterFrame = function(){  
if(this.containerMC.\_alpha \< 100){  
this.containerMC.\_alpha += 10  
}  
if(this.up == false){  
this.o.rb -= 10  
this.o.bb -= 10  
this.o.gb -= 10  
} else {  
if(this.o.rb \< 255){  
this.o.rb \*= 1.5  
this.o.bb \*= 3  
this.o.gb \*= 1.5  
} else {  
this.o = {rb:255,gb:255,bb:255}  
this.up = false;  
}  
}  
if(this.o.rb \< 0){  
this.o = {rb:0,gb:0,bb:0}  
delete this.onEnterFrame;  
}  
this.c.setTransform(this.o)

```
};

```

};

/M
