This is really frustrating me. I have an external style sheet, and it looks great, but it “flashes” the unstyled content prior to applying the style.
private var style:WalkStyleSheet = new WalkStyleSheet(); //load my CSS
...
var locTextField:TextField = new TextField();
locTextField.styleSheet = style.styleSheet;
locTextField.selectable = false;
locTextField.multiline = true;
locTextField.wordWrap = true;
if (_isTestMode && !isRevealed) {
locTextField.htmlText = "<p class='mediumBoldHeadlineLeft'>Click Here to Reveal Description</p>";
textBoxContainer.buttonMode = true;
textBoxContainer.addEventListener(MouseEvent.CLICK, revealDescription);
} else if (isRevealed) {
locTextField.htmlText = "<p class='mediumBoldHeadlineLeft'>" + _area[_areaIndex].location[_locationIndex].name + "</p>"
+ "
<p>" + _area[_areaIndex].location[_locationIndex].description
+ "</p>";
}
locTextField.height = 275;
locTextField.width = 350;
locTextField.x = 35;
locTextField.y = 375;
locTextField.name = "locTextField";
textBoxContainer.addChild(locTextField);
:hangover: