1

Hi everyone I am currently working on designing a flash program using adobe flash cs6 and as3. I cannot for the life of me figure out how to change the dropdown default light blue hover color in a comboBox component. I have changed all the other colors I need but that. Also I was able to change the font color when hovered over using the code below.
This is merely a design constraint and isn't affecting my program in any other way except for uniformity. Any help would be GREATLY appreciated!

import fl.events.*;
import fl.managers.*;
import fl.controls.*;
import fl.controls.listClasses.*;

stop();

var standard = new TextFormat();
standard.color = 0x000000;
StyleManager.setStyle("standard",standard);

var hover_color = new TextFormat();
hover_color.rollOverColor = 0xff0000;
StyleManager.setStyle("hover_color",hover_color);

StyleManager.setComponentStyle(ComboBox,"textFormat",StyleManager.getStyle("standard"));
StyleManager.setComponentStyle(TextInput,"textFormat",StyleManager.getStyle("standard")); 
// comboBox labelField
StyleManager.setComponentStyle(CellRenderer,"textFormat",StyleManager.getStyle("standard"));

FGOne_cb.dropdown.addEventListener(ListEvent.ITEM_ROLL_OVER, rollOverListener);
FGOne_cb.dropdown.addEventListener(ListEvent.ITEM_ROLL_OUT, rollOutListener);

function rollOverListener(e:ListEvent)
{
     var cr:CellRenderer = e.target.itemToCellRenderer(e.item) as CellRenderer;
     cr.setStyle("textFormat",StyleManager.getStyle("hover_color"));
}

function rollOutListener(e:ListEvent)
{
    var cr:CellRenderer = e.target.itemToCellRenderer(e.item) as CellRenderer;
    cr.setStyle("textFormat",StyleManager.getStyle("standard"));
}

1 Answers1

0

While it looks like you're trying to this by code. In FlashPro, you can style all the component skins by editing their symbols.

They can be found in your library under Component Assets

The specific one you're looking for is likely under Component Assets -> Shared -> focusRectSkin

Or maybe the comboBox_downSkin

screenshot of where to find component skins

BadFeelingAboutThis
  • 14,445
  • 2
  • 33
  • 40