在flex中使用嵌入html文件以解决显示html的问题
想在flex中真实的显示html,但是texteara,lable,text中只支持部分html标签
<a>、<b>、<br>、<font>、<img>如果用img又存在显示自动换行的问题。只有采用嵌入html的方法来解决。
1.flexdemo1
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*" width="427" height="282" viewSourceURL="srcview/index.html">
<mx:Panel x="10" y="10" width="407" height="262" layout="absolute" title="TabNavigator with HTML IFrame Enclosures">
<mx:TabNavigator x="10" y="10" width="367" height="202">
<local:IFrame source="http://www.ff-power.com" label="T网" width="100%" height="100%">
</local:IFrame>
<local:IFrame source="http://www.ctott.com" label="飞凡动力" width="100%" height="100%">
</local:IFrame>
<local:IFrame source="http://www.ff-power.com/bbs" label="飞凡动力-BBS" width="100%" height="100%">
</local:IFrame>
</mx:TabNavigator>
</mx:Panel>
</mx:Application>
2.Iframe.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
resize="callLater(moveIFrame)"
move="callLater(moveIFrame)">
<mx:Script>
<![CDATA[
import flash.external.ExternalInterface;
import flash.geom.Point;
import flash.net.navigateToURL;
private var _source: String;
private function moveIFrame(): void {
var localPt:Point = new Point(0, 0);
var globalPt:Point = this.localToGlobal(localPt);
 
相关文档:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<title>CSS</title>
<style type="text/css">
<!--
*{margin:0;padding:0;}
body {
fo ......
这里说的其它标签,主要是要配合后面讲的CSS样式表来使用的,如果没有样式表,则这些标签显示效果不明显。
这里我们先把这些标签记住。
------------
组合标签
span标签是一个组合标签,作用是将连续的元素(如一段文本类型元素)通过该标签分成若干个子元素。
和p标签不同,默认情况下span标签内的文本不会附加任何特 ......
不久前,Michael Portuesi发表了一篇博文,谈到了Flex开发者需要知道的10件事。文章介绍了每个进入Flex领域的开发者都需要掌握的基本知识与技能。
Michael Portuesi给出的10个条目中,有些是开发者需要了解的简单细节信息;有些则揭示了Flash/ActionScript/Flex与其他开发环境之间的差别。
如果你了解HTML/CSS并熟悉JavaS ......
Adobe Flex开发与传统的Web开发有很多不同之处。正确的理解和利用这些不同之处,可以帮助我们创建更丰富的用户体验,也可以反过来增加网站的可用性以及浏览和更新速度。Flex还提供了大量的组件和技术库来让Web开发更加轻松——它提供的强大工具要远远超过传统Web 2.0中的异步JavaScript和XML(Ajax)应用。此外, ......
I always consider the coolitm control only can use its control tag in its body.
But I found that it can use html tag ,this very good.
so I show the sample to other:
<ext:Window
ID="Window1"
runat="server"
Width="500"
Height="485"
......