textFormat Change

Hey,

I have a simple button with a dynamic text field in it. I also have a few movieClips on the same stage that are doing funky things …

Basicaly I am looking to change the colour of the text in the button when one of my MC’s is release/clicked.

I have the following code :

mc1.onRelease = white;

^^ Function caller on a MC

function white() {
    myTextFormat = new TextFormat();
    myTextFormat.color = '0xFFFFFF';
    _root.stopSounds.stopText.setTextFormat(myTextFormat);
}

^^ Function itself

Now my text field is inside a button with instance name stopSounds and the field itself has the name stopText.

All the code is on an actions frame on the root timeline. Problem is, sod all is happening and its driving me nuts. I must have been staring at this too long because I cannot see whats wrong with the code.

Any help is appreciated.

Kind Regards,