How do I add HTML开发者_如何转开发 inside my Flex app just like the one Tour De Flex uses.
Here's a screenshot: http://screencast.com/t/JH6X1qUBNLI
Use the HTML Component. It is AIR only, so you won't be able to do this in a web based app.
For a web based app, you'll want to use the iFrame trick.
The tag <mx:TextArea> can have a nested <mx:htmlText> tag that can contain HTML code. For example:
<mx:TextArea id="htmlTextWillAppear"
width="100%" height="100%"
borderStyle="none"
editable="false"
condenseWhite="true">
<mx:htmlText>
<![CDATA[
<p>This is where the HTML will go icluding Links, images, unordered lists, et.</p>
]]>
</mx:htmlText>
</mx:TextArea>
The CDATA tag is needed so that the Flex compiler knows to interpret what follows literally and not as MXML tags.
I use this method to pupulate the text in my Flex website that provides tutorials for creating accessible Flex content.
精彩评论