<?xml version="1.0" encoding="utf-8"?>
<mx:Application name="Panel_titleIcon_test"
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white"
initialize="init();">
<mx:String id="lorem" source="lorem.txt" />
<mx:Script>
<![CDATA[
import mx.controls.Text;
import mx.containers.Panel;
[Embed("assets/Panel.png")]
private const PanelTitleIcon:Class;
private var panel:Panel;
private function init():void {
var txt:Text = new Text();
txt.text = lorem;
txt.selectable = false;
txt.width = 500;
txt.setStyle("textAlign", "justify");
panel = new Panel();
panel.title = "Panel title";
panel.titleIcon = PanelTitleIcon;
panel.addChild(txt);
addChild(panel);
}
]]>
</mx:Script>
</mx:Application>