TLF rendering issue when viewed in browser
Hello,
I'm running into an issue, where publishing my project within the Flash IDE, the TextFlow seems to render as expected. However, when viewed in a browser, the TextFlow seems to render the later part of the string in what appears to be the bold font.
Here is my code::
var _origStr:String=<p>Here is some bold text and some text following the bolded text. Here is an inline image <img src="images/myImage.png" width="25" height="12" />. <br /><br />Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <a href="http://google.com">Test Link</a></p>"
//create format object
var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
textLayoutFormat.color = 0xffffff;
textLayoutFormat.fontSize = 12;
var linkHoverFormat:TextLayoutFormat = new TextLayoutFormat();
linkHoverFormat.color = 0x879637;
var linkActiveFormat:TextLayoutFormat = new TextLayoutFormat();
linkActiveFormat.color = 0x879637;
var linkNormalFormat:TextLayoutFormat = new TextLayoutFormat();
linkNormalFormat.color = 0x165788;
// create a container and a controller for it
var config:Configuration=new Configuration();
config.textFlowInitialFormat=textLayoutFormat;
config.defaultLinkHoverFormat=linkHoverFormat;
config.defaultLinkNormalFormat=linkNormalFormat;
config.defaultLinkActiveFormat=linkActiveFormat;
var textFlow:TextFlow = TextConverter.importToFlow(_origStr, TextConverter.HTML_FORMAT, config);
trace(TextConverter.export(textFlow, TextConverter.TEXT_LAYOUT_FORMAT, ConversionType.XML_TYPE));
if(_origStr.indexOf("</a>")>-1){
textFlow.addEventListener(FlowElementMouseEvent.CLICK, doHTMLLink);
}
textFlow.flowComposer.addController(new ContainerController(this,_targetWidth,_targetHeight));
textFlow.flowComposer.updateAllControllers();
Am I missing something? Any ideas / suggestions is greatly appreciated!
Cheers!
- MB
