在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><title>
</title>
</head>
<body>
<table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF"
&n ......
<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 ......
很久没去练习flex 开始有点生疏,用起来还是很舒服。flex 3和flex4之间存在一些差别,所以在选择的时候需要小心一点,今年主推flex 4 所以初学的人可以跳过flex 3直接学flex4。 因为flex 开发是建立在as 3基础上,故此研究类库之间结构是一件很不错的事情。毕竟结构美是学习编程一种美学流。
今天的纯粹练习 ......
完成以下部分:
1. 树可以接受singleXml格式和json以及jsonarray格式的数据;
2. 复选框勾选和折叠子节点的逻辑用div嵌套来实现,效率更高;并提供了快速画树的方法;(存在bug:快速画树效率并不高,div嵌套有问题);
3.增加树的深度 this.depth ......