Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Color and Buttons 1

Status
Not open for further replies.

Brian56

Programmer
May 29, 2003
66
CA
Hi

My navigation system is complete and working but i have one final touch to add. The buttons are currently blue but I need to have them fade to white as the mouse approaches them.

Company colors are blue and white. This has to a gradual change and not a sudden one.

I have playing around with setrgb but not making much progress.

Ideas?

Brian
 
this wont do it but will show how. ought to get what you want by playing with the values. assumes the menu is at the top of the screen. if its down the side then use _xmouse

this.onEnterFrame = function(){
myColor = new Color(my_button);
myColorTransform = new Object();
myColorTransform.ra = 0;
myColorTransform.rb = 5;
myColorTransform.ga = 0;
myColorTransform.gb = 5;
myColorTransform.ba = 100;
myColorTransform.bb = _ymouse;
myColorTransform.aa = 100;
myColorTransform.ab = 0;
myColor.setTransform(myColorTransform);
}


_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
Thanks Bill but I need more help.

In applying your code and changing the values I can almost get close to what I want but not the exact effect.

I am just guessing at the values and that will be why it is not working.

I cannot have the rb and gb values as constants and I am unsure of how to change them.

 
the code i threw done was just an example...this ought to be better

this.onEnterFrame = function(){
myColor = new Color(my_button);
x = stage.height;
myColorTransform = new Object();
myColorTransform.ra = 0;
myColorTransform.rb = 255 - _ymouse;
myColorTransform.ga = 0;
myColorTransform.gb = 255 - _ymouse;
myColorTransform.ba = 100;
myColorTransform.bb = 255;
myColorTransform.aa = 100;
myColorTransform.ab = 0;
myColor.setTransform(myColorTransform);
}


_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
Wonderfull.

Thats it Bill and I am now very close.

Many, many thanks for your help.

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top