# Gallery Help? Rollover and fade in functions

**URL:** <https://forum.kirupa.com/t/gallery-help-rollover-and-fade-in-functions/150609>\
**Category:** Uncategorized\
**Created:** [June 9, 2005, 3:12am UTC](https://forum.kirupa.com/t/gallery-help-rollover-and-fade-in-functions/150609 "2005-06-09T03:12:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![woodman650](https://avatars.discourse-cdn.com/v4/letter/w/b9bd4f/32.png) [@woodman650](https://forum.kirupa.com/u/woodman650)\
**Post date:** [June 9, 2005, 3:12am UTC](https://forum.kirupa.com/t/gallery-help-rollover-and-fade-in-functions/150609/1 "2005-06-09T03:12:38Z")

</div>

Hey all!  
I found this XML gallery a few days ago and am trying to add a few custom touches to it.  
I’m trying to get these functions to work with the thumbnails and main images…

> myImage.onRollOver = function() {  
> setColor(this);  
> };  
> myImage.onRollOut = function() {  
> returnColor(this);  
> };  
> function setColor(target) {  
> target.onEnterFrame = function() {  
> target.brightness += 10;  
> my\_color = new Color(target);  
> myColorTransform = new Object();  
> myColorTransform = {ra:‘100’, rb:target.brightness, ga:‘100’, gb:target.brightness, ba:‘100’, bb:target.brightness, aa:‘100’, ab:‘0’};  
> my\_color.setTransform(myColorTransform);  
> if (target.brightness\>=60) {  
> delete target.onEnterFrame;  
> }  
> };  
> }  
> function returnColor(target) {  
> target.onEnterFrame = function() {  
> var my\_color;  
> var myColorTransform;  
> target.brightness -= 10;  
> my\_color = new Color(target);  
> myColorTransform = new Object();  
> myColorTransform = {ra:‘100’, rb:target.brightness, ga:‘100’, gb:target.brightness, ba:‘100’, bb:target.brightness, aa:‘100’, ab:‘0’};  
> my\_color.setTransform(myColorTransform);  
> if (target.brightness\<=0) {  
> delete target.onEnterFrame;  
> }  
> };  
> }

(where myimage is the temp name of the nonexistent movieclip)

Basically, I’m just trying to get the thumbnails to execute the setcolor on rollover and the returncolor on rollout. here are the files…  
[www.thepixelsink.com/other/cool.zip](http://www.thepixelsink.com/other/cool.zip)

any help would be greatly appreciated! thanks a bunch
