Ok, posted twice on this subject but havn't got any useful replies. after some digging up, ive made some code you can use to customize the look and feel of your components (the font, size, colours etc.) here goes...


************************************************** *************

say you have a list box on stage and you want to change the font and font size. do this

1. drag a component on stage. in this case it is a list box.
2. give it an instance name. i have used 'myListBox'
3. Select this component by clicking on it, then create a new layer above it - name it if you want. select any frame in this layer and open the actions panel.
4. enter this code.

//set style for only this component - myListBox
myListBox.setStyleProperty("textFont", "Courier New");
myListBox.setStyleProperty("textSize", 10);

add other properties as required. thats it.

************************************************** *************

in case you want to apply style changes throughout any component that appears in your swf, then use this code in the first frame of your fla.

// apply global style format.
// this will affect any component in the movie
globalStyleFormat.textFont = "Teachers Pet Sans Serif";
globalStyleFormat.textSize = 8;
globalStyleFormat.addListener(emailCheckBox, myListBox, myRadio, myRadio2, myRadio3, myRadio4);


************************************************** *************

say you have a group of components on stage (say a listbox - instance name 'myListBox', a checkBox - instancename 'myCheckBox', and a combo box - instance name 'myComboBox')

now you want to apply a particular style to just these three components without affecting any other components on the stage.

use this code in the first frame of the movie. change the properties as required.

//define the new style
var myStyleFormat = new FStyleFormat();
//define your new styles properties
myStyleFormat.arrow = 0x333300;
myStyleFormat.background = 0xffffff;
myStyleFormat.backgroundDisabled = 0xccffcc;
myStyleFormat.darkshadow = 0x333300;
myStyleFormat.foregroundDisabled = 0x999999;
myStyleFormat.face = 0x99cc99;
myStyleFormat.textSize = 12
myStyleFormat.highlight = 0x99cc00;
myStyleFormat.highlight3D = 0x333300;
myStyleFormat.radioDot = 0x333300;
myStyleFormat.scrollTrack = 0x99cc99;
myStyleFormat.selection = 0x333300;
myStyleFormat.selectionDisabled = 0x999999;
myStyleFormat.selectionUnfocused = 0x999999;
myStyleFormat.shadow = 0x99cc00;
myStyleFormat.textColor = 0x000000;
myStyleFormat.textDisabled = 0x999999;
myStyleFormat.textSelected = 0x000000;
// add a listener for each instance the style is required
myStyleFormat.addListener(myComboBox, myListBox, myCheckBox);

************************************************** *************

sid