I’m working with last.fm’s api to return a biography for an artist… which I have working and displaying on the stage in a textfield.
However I am having trouble formatting the text. I want to be able to do a little css on it basically (manipulate the fonts, size, etc.) but it doesn’t work the way I am approaching it.
I thought maybe this could be to do with the fact it’s ‘htmlText’?
public function doArtistDataReady(evt:LFMArtistInfoEvent):void {
var bio:String = evt.artistInfo.bio.summary;
//var bioField:TextField = new TextField();
var bioFormat : TextFormat = new TextFormat("Verdana", 20, 0x0000FF, true, true, false, null, null, TextFormatAlign.LEFT, 10, 10, 0, null);
bioField.setTextFormat(bioFormat);
bioField.width = 350;
bioField.height = 300;
bioField.x = 830;
bioField.y = 20;
bioField.background = true;
bioField.backgroundColor = 0xFFFFFF;
bioField.border = true;
bioField.borderColor = 0xFFFFFF;
bioField.multiline = true;
bioField.wordWrap = true;
bioField.alpha = .5;
addChild(bioField);
bioField.htmlText = "Biography:" + bio;
trace("bio:" + bio);
bioField.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownScroll);
}
Please can somebody point me in the right direction this is driving me carrrazzy.