目次 |
---|
・Labelとは ・Labelのソース ・Labelのサンプル |
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ private var htmlData:String="<br>This label displays <b>bold</b> and <i>italic</i> HTML-formatted text."; private function displayHTML():void { simpleLabel.htmlText= htmlData; } private function displayText():void { simpleLabel.text="This Label displays plain text."; } ]]> </mx:Script> <mx:Label id="simpleLabel" text="This Label displays plain text."/> <mx:Button id="Display" label="Click to display HTML Text" click="displayHTML();"/> <mx:Button id="Clear" label="Click to display plain text" click="displayText();"/> </mx:Application>