Movie clip AS colour transition problem

Hello all once again. Ive taken the advice and tried to extend upon of colour transitions. I have attached a file to show what i have at the moment. Once you have seen the basics you will know what i am on about.

I have got one box to change colour but im trying to get all boxes to change into different tints and stuff like that. I have the variables set and they seem fine.

What do I need to change on the actionscript to get all 3 boxes changing at once.

u mean like this siteā€¦??

Indeed. Wanting to run upon a different format for images and annotation. (Using as a gallery once i have decided what colour scheme to use)

It gave me a bit of inspiration and i wouldnt mind playing with the idea and expanding upon it. If any body has usefull info it would be appreciated.

Scott : )

Anybody able to help me out with this. I have updated the file so I have 3 boxes changing but i am having difficulty setting out both a second and third function. I have included a copy of the AS i am using

var frames = 12;
var defaultHex1 = 0x000000;
var defaultHex2 = 0xcccccc;
function rgbToHex(r, g, b) {
return (r << 16 | g << 8 | b);
function hex2rgb(hex) {
var red = hex >> 16;
var grnBlu = hex-(red << 16);
var grn = grnBlu >> 8;
var blu = grnBlu-(grn << 8);
return ({r:red, g:grn, b:blu});
// Colour Objects Movie Clips variables set
var myCO1 = new Color(part1);
var myCO2 = new Color(part);
var myCO3 = new Color(part2);
// Fading Function thing
function fadeToHex(goalHex, steps) {
var nowHex = myCO1.getRGB();
var nowHex = myCO2.getRGB();
var nowHex = myCO3.getRGB();
var nowRGB = hex2rgb(nowHex);
var goalRGB = hex2rgb(goalHex);
var stepRGB = {};
stepRGB.r = (goalRGB.r-nowRGB.r)/steps;
stepRGB.g = (goalRGB.g-nowRGB.g)/steps;
stepRGB.b = (goalRGB.b-nowRGB.b)/steps;
var inc = 0;
onEnterFrame = function () {
if (inc<steps) {
var newR = (Math.round(nowRGB.r += stepRGB.r));
var newG = (Math.round(nowRGB.g += stepRGB.g));
var newB = (Math.round(nowRGB.b += stepRGB.b));
var newHex = rgbToHex(newR, newG, newB);
} else {
onEnterFrame = null;
// Button Function Colour Bits
Index.onRelease = function() {
fadeToHex(0xff0000, frames);
gallery.onRelease = function() {
fadeToHex(0xffcc00, frames);
Services.onRelease = function() {
fadeToHex(0x0098c8, frames);
Products.onRelease = function() {
fadeToHex(0x00ccd0, frames);
links.onRelease = function() {
fadeToHex(0x98cc00, frames);
contact.onRelease = function() {
fadeToHex(0xffff98, frames);

I have also bundled the fla file with my first posting.

As sipher said before i am using this site as a basis but i am planning to expand and develop ontop of this

They are using some scripting that tells each box to change to a set hex code in the AS on the release of a button.