`
diding
  • 浏览: 81265 次
  • 性别: Icon_minigender_1
  • 来自: 四川
社区版块
存档分类
最新评论

SDK 4.5 (Hero)TextLayout 随记

    博客分类:
  • Flex
阅读更多
TextLayout前沿更新:
http://sourceforge.net/projects/tlf.adobe/files_beta/latest/



1.[2010.11.6] 动手修改
TextLayout使用说明:如果采用FlashBuilder,其自身也有TextLayout
Step1:
删除SDK 下面的 frameworks\libs\textLayout.swc(不能RSL)
Step2
把frameworks\projects\textLayout\src下面的flashx和flash包复制出来放到工程下面
Step3(flex4.5)
修改flashx.textLayout.property包下的三个文件
NumberPropertyHandler.as
public function NumberPropertyHandler(minValue:Number,maxValue:Number,limits:String=null)
		{
			_minValue = minValue;
			_maxValue = maxValue;
			if(!limits){
				_limits = Property.ALL_LIMITS
			}else{
				_limits = limits;
			}
		}

IntPropertyHandler.as
public function IntPropertyHandler(minValue:int,maxValue:int,limits:String=null)
		{
			_minValue = minValue;
			_maxValue = maxValue;
			if(!limits){
				_limits = Property.ALL_LIMITS
			}else{
				_limits = limits;
			}
		}

PercentPropertyHandler.as
public function PercentPropertyHandler(minValue:String,maxValue:String,limits:String=null)
		{
			_minValue = Property.toNumberIfPercent(minValue);
			_maxValue = Property.toNumberIfPercent(maxValue);
			if(!limits){
				_limits = Property.ALL_LIMITS
			}else{
				_limits = limits;
			}
		}

Step4
修改编译参数:
-locale en_US -define=CONFIG::debug,true -define=CONFIG::release,true
Step5 新建工程
当前工程:也要删除,但不要删除文件 1045: Interface ISWFContext was not found.
新建工程 不会出现上述错误
2. 2010-11-6
Note1.
在EditManager.as 修改inertInlineGraphicElement方法时,由于参数名一样,throwError;
// Main Thread (Suspended: VerifyError: Error #1053: Illegal override of EditManager in flashx.textLayout.edit.EditManager.)

Note2.
var highlightFormat:TextLayoutFormat = new TextLayoutFormat();
highlightFormat.backgroundColor = 0xffee66;
var keywordsArray:Array = model.keywords.toLowerCase().split(' ');
var indexOfKeyword:int = 0;
for each (var currentKeyword:String in keywordsArray) {
    while((indexOfKeyword = this.text.toLowerCase().indexOf(currentKeyword, indexOfKeyword)) >= 0) {               
        this.setFormatOfRange(highlightFormat, indexOfKeyword, indexOfKeyword + currentKeyword.length);
        indexOfKeyword++;
    }
}
Note3.
var txt:RichEditableText;
var html:String = "<b>some <i>rich</i> text</b>";
var mgr:EditManager = txt.textFlow.interactionManager as EditManager;
var flow:TextFlow = TextConverter.importToFlow(html,TextConverter.TEXT_FIELD_HTML_FORMAT);
mgr.pasteTextScrap(new TextScrap(flow));

3.2010.11.09

在Richard和Robin的帮助下,完成list的创建,编辑,删除

核心代码:

package net.diding.control
{
	import flash.events.EventDispatcher;
	import flash.events.MouseEvent;
	import flash.text.engine.TextLine;
	import flash.ui.ContextMenu;
	import flash.ui.ContextMenuBuiltInItems;
	import flash.ui.ContextMenuItem;
	import flash.ui.Mouse;
	import flash.ui.MouseCursor;
	
	import flashx.textLayout.compose.TextFlowLine;
	import flashx.textLayout.edit.EditManager;
	import flashx.textLayout.edit.EditingMode;
	import flashx.textLayout.edit.IEditManager;
	import flashx.textLayout.edit.SelectionState;
	import flashx.textLayout.elements.FlowElement;
	import flashx.textLayout.elements.FlowGroupElement;
	import flashx.textLayout.elements.LinkElement;
	import flashx.textLayout.elements.ListElement;
	import flashx.textLayout.elements.ListItemElement;
	import flashx.textLayout.elements.ParagraphElement;
	import flashx.textLayout.elements.SpanElement;
	import flashx.textLayout.elements.TextFlow;
	import flashx.textLayout.events.CompositionCompleteEvent;
	import flashx.textLayout.events.FlowElementMouseEvent;
	import flashx.textLayout.events.UpdateCompleteEvent;
	import flashx.textLayout.formats.ListMarkerFormat;
	import flashx.textLayout.formats.ListStyleType;
	import flashx.textLayout.formats.TextLayoutFormat;
	
	import mx.controls.Alert;
	import mx.core.FlexGlobals;
	import mx.managers.PopUpManager;
	
	import net.diding.window.UnOrderedListWindow;
	
	import spark.components.RichEditableText;
	
	public class ListInsertManager extends EventDispatcher
	{
		private var _Manager:*;
		private var showDisplay:*
		private var richEditableText:RichEditableText
		
		public function ListInsertManager(target:*=null)
		{
			super();
			_Manager=target;
			//richEditableText=_Manager.textflow.flowComposer.getControllerAt(0).container as RichEditableText;
			//richEditableText.addEventListener(MouseEvent.MOUSE_DOWN, ListElementHandler2)
		}
		
		/***********************************************************
		 ************************ Set list********************
		 * *********************************************************/ 
		//open the window to set or modify or remove the unordered list
		private var kindStr:String;
		
		public function doOpenListWinHandler(listElement:ListElement=null, disPlayObj:*=null):void
		{
			
			if (listElement)
			{
				var window:UnOrderedListWindow=UnOrderedListWindow(PopUpManager.createPopUp(_Manager, UnOrderedListWindow, true));
				window.getWinFindArg(this, listElement, true)
			}
			else if (_Manager.selStart != _Manager.selFinish)
			{
				var window2:UnOrderedListWindow=UnOrderedListWindow(PopUpManager.createPopUp(_Manager, UnOrderedListWindow, true));
				window2.getWinFindArg(this);
			}
			else
			{
				Alert.show("Please select the paras", "Notice")
			}
		}
		
		//set or modify the list
		private var watchIndex:int;
		
		public function setOrEditList(currentListElement:ListElement=null, listformat:TextLayoutFormat=null, lmf:ListMarkerFormat=null):void
		{
			var em:EditManager=EditManager(_Manager.textflow.interactionManager);
			if (currentListElement != null)
			{
				//Edit
				var beginIndex:int=currentListElement.getAbsoluteStart();
				watchIndex=beginIndex
				//var lastIndex:int=beginIndex + currentListElement.textLength+int(currentListElement.numChildren);
				//em.selectRange(beginIndex, lastIndex)
				
				/**************************************
				 * here
				 * i want to set the list just the same as i set url ,but failed
				 *if the listformat-->ListStyleType.NONE
				 *not really remove the list
				 * *************************************/ 
				// em.createList(null, listformat, lmf)
				currentListElement.listStyleType=listformat.listStyleType;
				currentListElement.listStylePosition=listformat.listStylePosition;
				currentListElement.paddingLeft=listformat.paddingLeft
				//currentListElement.listMarkerFormat=lmf;
			}
			else
			{
				//Create
				em.selectRange(_Manager.selStart, _Manager.selFinish);
				watchIndex=_Manager.selStart;
				em.createList(null, listformat, null);
				//em.createSPGE(null, listformat,null);
			}
			_Manager.textflow.interactionManager.setFocus();
			_Manager.textflow.flowComposer.updateAllControllers()
			richEditableText=_Manager.textflow.flowComposer.getControllerAt(0).container as RichEditableText;
			richEditableText.addEventListener(MouseEvent.MOUSE_DOWN, ListElementHandler)
		}
		
		/***************************************************
		 *  ----I want to get the list that I clicked ,but failed-----
		 * here I want to get the list to modify or remove when i click the list,but
		 * when i click it in the list, always I get FlowGroupElement's numChildren is one;
		 * outside ,i will see the list and its numchilren. Why?
		 * **************************************************/
		private var flowGropElement:FlowGroupElement;
		private var currentListIdx:int;
		
		
		private function ListElementHandler2(event:MouseEvent):void
		{
			trace("event.target===" + event.target)
			
			
			trace("richEditableText---" + richEditableText.textFlow.numChildren)
			trace("richEditableText's parent flowgroupElement---" + richEditableText.textFlow.parent)
			
			
			var textflowNum:int=richEditableText.textFlow.numChildren
			for (var i:int=0; i < textflowNum; i++)
			{
				trace(richEditableText.textFlow.getChildAt(i));
				var flowElement:*=richEditableText.textFlow.getChildAt(i);
				if (flowElement is ListElement)
				{
					currentListIdx=i;
					
					var clickedList:ListElement=flowElement as ListElement;
					trace("listElement's child==" + clickedList.numChildren)
					//each sign as a char
					trace("listElement's length==" + clickedList.textLength + int(clickedList.numChildren))
					var absIndex:int=clickedList.getAbsoluteStart();
					//var total:int=absIndex + clickedList.textLength + int(clickedList.numChildren)
					var total:int=absIndex + clickedList.textLength
					if (_Manager.selStart < total && _Manager.selStart > absIndex)
					{
						
						doOpenListWinHandler(clickedList, null)
						
						trace("cliked me")
						break;
					}
				}
				
			}
		}

		private function ListElementHandler(event:MouseEvent):void
		{
			trace("event.target===" + event.target)
			var textLine:TextLine=event.target as TextLine;
			
			
			if (textLine)
			{
				trace("textLine.parent==" + textLine.parent) //textDisplay
				if (textLine.userData)
				{
					var textFlowLine:TextFlowLine=textLine.userData as TextFlowLine;
					
					if (textFlowLine)
					{
						var paraElement:ParagraphElement=textFlowLine.paragraph as ParagraphElement;
						
					}
					if (paraElement)
					{
						//The FlowGroupElement class is the base class for 
						//FlowElement objects 
						//that can have an array of children. 
						//These classes include 
						//TextFlow, ParagraphElement, DivElement, and LinkElement
						
						flowGropElement=paraElement.parent as FlowGroupElement;
					}
					if (flowGropElement)
					{
						trace("flowGropElement numChildren==" + flowGropElement.numChildren)
						var fgeChildNum:Number=flowGropElement.numChildren;
						//currentfgeIdx=flowGropElement.getAbsoluteStart();
						if (fgeChildNum == 1)
						{
							var tflow:ListElement=flowGropElement.getChildAt(0)as ListElement
							/*
							*The List class is used for grouping together items into a numbered
							or unnumbered list. A ListElement's children may be of
							type ListItemElement, ListElement, ParagraphElement,
							or DivElement.
							*/
							
							trace("richEditableText---" + richEditableText.textFlow.numChildren)
							trace("richEditableText's parent flowgroupElement---" + richEditableText.textFlow.parent)
							var textflowNum:int=richEditableText.textFlow.numChildren
							for (var i:int=0; i < textflowNum; i++)
							{
								trace(richEditableText.textFlow.getChildAt(i));
								var flowElement:*=richEditableText.textFlow.getChildAt(i);
								if (flowElement is ListElement)
								{
									currentListIdx=i;
									
									var clickedList:ListElement=flowElement as ListElement;
									trace("listElement's child==" + clickedList.numChildren)
									//each sign as a char
									trace("listElement's length==" + clickedList.textLength + int(clickedList.numChildren))
									var absIndex:int=clickedList.getAbsoluteStart();
									//var total:int=absIndex + clickedList.textLength + int(clickedList.numChildren)
									var total:int=absIndex + clickedList.textLength
									
									
									//is click listElement?
									//maybe there are many listelements in it
									if (_Manager.selStart < total && _Manager.selStart > absIndex)
									{
										
										//var em:IEditManager=IEditManager(_Manager.textflow.interactionManager);
										//em.selectRange(absIndex,total)
										doOpenListWinHandler(clickedList, null)
										
										trace("cliked me")
										break;
									}
								}
								
							}
						}
					}
				}
			}
			
			
		}
		
		//private var flowGropElement:FlowGroupElement;
		//private var currentListIdx:int;
		//remove
		public function delList(currentListElement:ListElement):void
		{
			var em:IEditManager=IEditManager(_Manager.textflow.interactionManager);
			
			trace(currentListElement.numChildren);
			var target:FlowGroupElement=currentListElement.parent;
			var targetIndex:int=target.getChildIndex(currentListElement);
			em.moveChildren(currentListElement, 0, currentListElement.numChildren, target, targetIndex);
		}
		
		
	}
}

4.2010.11.12.
  Ige由于采用loop方式,效果不好,最终决定采用bmpd方式,
原来的方式:
richEditableText.addEventListener(MouseEvent.CLICK, imageClickHandlers);

private function imageClickHandlers(event:MouseEvent):void
		{
			var hitrect:Rectangle
			var mouseX:Number=richEditableText.mouseX;
			var mouseY:Number=richEditableText.mouseY;
			var point:Point=new Point(mouseX, mouseY);
			var isClickImg:Boolean=false;
			var sendImg:InlineGraphicElement;
			trace("_images.length===" + _images.length)
			for (var i:uint=0; i < _images.length; i++)
			{
				var rect:Rectangle=_images[i].graphic.getBounds(richEditableText);
				if (rect.contains(point.x, point.y))
				{
					var currentILG:InlineGraphicElement=_images[i]as InlineGraphicElement;
					
					var absIndex:int=currentILG.getAbsoluteStart();
					var between:int=absIndex + currentILG.textLength;
					if (_Manager.selStart < between)
					{
						//编辑用
						clickInlineGripicElement=currentILG;
						isClickImg=true;
						sendImg=currentILG;
						break;
					}
				}
			}
			
			trace("是否点了图片====" + isClickImg)
			if (isClickImg)
			{
				//放在后面将不能编辑图片
				CMDManageImageClick(sendImg);
				//switchToEditingMode(EditingMode.READ_ONLY);
				isClickImg=false
			}
			else
			{
				if (imgMoveSacaleController)
					imgMoveSacaleController.removePositionSelector();
			}
			
		}
		
		//----------------------------------------------------------------------
		private function CMDManageImageClick(getILG:InlineGraphicElement):void
		{
			//var em:EditManager=EditManager(_Manager._textFlow.interactionManager)
			trace(_Manager.editingModeString)
			//&&(em.editingMode=="readOnly")
			
			if (getILG is InlineGraphicElement)
			{
				isBegin=_Manager.selStart;
				isLast=_Manager.selFinish;
				trace("isBegin" + isBegin)
				trace("isBegin" + isLast)
				if (isBegin == isLast)
					//if (isBegin - isLast == -1 || isLast - isBegin == 1)
				{
					nowSelecting=true;
					isBeginEditImage=true;
					imgMoveSacaleController.AddManagerObject(getILG)
				}
				else
				{
					isBeginEditImage=false;
					Alert.show("请选择图片");
					//myImageClickManager.showMouse()
				}
			}
		}

//图片的编辑,移动都能可视化操作,(两种界面)
//由于点击触发点的问题,改用DisplayObect,这样只能修改TLF 源代码
//侦听器放在前面
			_Manager._textFlow.addEventListener(StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGE, graphicStatusChangeEvent2);
			EditManager(_Manager._textFlow.interactionManager).insertInlineGraphic(displayContainerSprite, _imageWidth, _imageHeight, "left",_path,"image", null)
	//倒数两个参数为自定义的,主要是确定插入的是shape/image/swf/table,如果播入的image,则_path不能为空		
_Manager._textFlow.flowComposer.updateAllControllers();

//export的xml
<TextFlow whiteSpaceCollapse="preserve"
		  version="2.0.0"
		  xmlns="http://ns.adobe.com/textLayout/2008">
	<p>
		<span>adds</span>
	</p>
	<p>
		<span>adds</span>
		<img height="60"
			 width="60"
			 source="http://127.0.0.1/companywebsite/php/images/Winter.jpg"
			 float="none"
			 objectKind="image"
			 objectUrl=""/>
		<span>adddddddssssssssss</span>
	</p>
	<p>Flex is a free, open source framework for building highly interactive, expressive web applications that dep</p>
	<p>Flex framework</p>
	<p>Flex framework</p>
	<p>I am a new paragraph and I'd like to start at the left below the image</p>
	<p>
		<span>adds</span>
		<img height="70"
			 width="70"
			 source="[object DisplayContainerSprite]"
			 float="left"
			 objectKind="image"
			 objectUrl="http://127.0.0.1/companywebsite/php/images/Winter.jpg"/>
		<span>adddddddssssssssss</span>
	</p>
	<p>
		<span>adds</span>
		<img height="121"
			 width="121"
			 source="[object DisplayContainerSprite]"
			 float="left"
			 objectKind="image"
			 objectUrl="http://127.0.0.1/companywebsite/php/images/ld.png"/>
		<span>dsddsdsdsdssd</span>
	</p>
</TextFlow>

要修改内容:IEditManager,EditManager, TextLayoutExporter, TextLayoutImporter, InsertInlineGraphicOperation, ParaEdit等

由于采用嵌入的方式处理图片
所以,需要从数据库或xml读取,预处理object的图片,之前遇到一个异步问题:
http://bbs.airia.cn/thread-43376-1-2.html
//发了帖,用Timer,效果不好,最终采用预处理textflowXML
//加载的xml文件,改用XMLDoc来处理’
private var textflow_xml:XML;
private function completeHandlerM(event:Event):void
{
	//trace("loadKind===="+loadKind)
	var myLoader:URLLoader=URLLoader(event.target);
	textflow_xml=XML(myLoader.data);
	
	var listStr:String=textflow_xml.toXMLString();
	
	var result:XMLDocument=new XMLDocument();
	result.ignoreWhite=true;
	result.parseXML(listStr);
	trace("总共==" + result.childNodes.length)
	var textflow:XMLNode=result.childNodes[0];
	trace("textflow的字节点== " + textflow.childNodes.length)
	for (var j:int=0; j < textflow.childNodes.length; j++)
	{
		var tempXMLNode:XMLNode=textflow.childNodes[j];
		doCheckNodes(tempXMLNode)
	}
	doLoadingImageAssetsFromDocInfo()
	
}
private var imgArr:Array=[];
private function doCheckNodes(getxmlNode:XMLNode):void
{
	trace(getxmlNode)
	trace("传过来的长度===" + getxmlNode.childNodes.length)
	if (getxmlNode.childNodes.length < 2)
	{
		var xmlNodeName:String=getxmlNode.nodeName;
		trace("len==1==" + xmlNodeName);
		if (xmlNodeName == "img")
		{
			trace("图像值===" + Object(getxmlNode.attributes).source);
			if (Object(getxmlNode.attributes).source == "[object DisplayContainerSprite]")
			{
				var tempObj:Object=new Object();
				tempObj.type=Object(getxmlNode.attributes).objectKind;
				tempObj.width=Object(getxmlNode.attributes).width
				tempObj.height=Object(getxmlNode.attributes).height
				tempObj.path=Object(getxmlNode.attributes).objectUrl
				imgArr.push(tempObj)
			}
		}
	}
	
	if (getxmlNode.childNodes.length > 1)
	{
		for (var i:int=0; i < getxmlNode.childNodes.length; i++)
		{
			doCheckNodes(getxmlNode.childNodes[i])
		}
	}
}

分享到:
评论
7 楼 fly728 2012-07-09  
flex 4.5 版本 的能给我发一份吗???现在急用 不盛感激  谢谢 181210913@qq.com
6 楼 yzzcom 2011-12-11  
xhc66 写道
楼主您好,我看过您写的那个《Flex图文混排》的帖子,当时是Flex 4 beta版本的,现在这个帖子应该是4.5版本的,变化应该挺大,我导入了原来beta版的,但是我用的是SDK 4.5,有很多API变化了,试着没调整成功,不知道您是否有4.5版本的代码可供学习参考,z6feitian@163.com 非常感谢!


楼主,我也有 xhc66 这位兄弟的使用情况,SDK4.5。
能否也传给我一份 对应版本 的代码供学习参考呢?
yzzcom@hotmail.com
不胜感激。
5 楼 huyan0501 2011-07-08  
diding,你好!List的插入和编辑我已经实现了。但是关于你所说的InlineGraphicElement的drag和drop的问题我还是不明白。
引用
//图片的编辑,移动都能可视化操作,(两种界面)
//由于点击触发点的问题,改用DisplayObect,这样只能修改TLF 源代码
//侦听器放在前面


这个修改Tlf源代码究竟该怎么做啊?万望指教。
4 楼 huyan0501 2011-06-14  
楼主你好!ListInsertManager类中的_Manager.selStart和_Manager.selFinish的值是怎么取的啊?selStart是自己取得吗?我知道可以通过下面的方式取到selStart所在段落,不知道对不对?_Manager.textFlow.findLeaf(editManager.getSelectionState().absoluteStart).getParagraph();
期盼您能给予指点?
3 楼 huyan0501 2011-06-07  
楼主你好!我仔细看了你写的ListInsertManager,但是还是不明白具体的使用方法,能指点一下吗?
简单的说说使用步骤就行了。谢谢
2 楼 diding 2011-03-05  
前段时间比较忙,所以没有过来....
//但是我用的是SDK 4.5,有很多API变化了,试着没调整成功
用Flex自已的不行,因为我改了些Flashx包的代码;

由于数据来源xml或来源用数据库,所以,程式一启动,有一个预处理过程:
private function parseXML():void{
	
	var listStr:String=textflow_xml.toXMLString();
	
	var result:XMLDocument=new XMLDocument();
	result.ignoreWhite=true;
	result.parseXML(listStr);
	trace("总共==" + result.childNodes.length)
	var textflow:XMLNode=result.childNodes[0];
	trace("textflow的字节点== " + textflow.childNodes.length)
	for (var j:int=0; j < textflow.childNodes.length; j++)
	{
		var tempXMLNode:XMLNode=textflow.childNodes[j];
		doCheckNodes(tempXMLNode)
	}
	doLoadingImageAssetsFromDocInfo()
	
}
private var imgArr:Array=[];
private function doCheckNodes(getxmlNode:XMLNode):void
{
	trace(getxmlNode)
	trace("传过来的长度===" + getxmlNode.childNodes.length)
	if (getxmlNode.childNodes.length < 2)
	{
		var xmlNodeName:String=getxmlNode.nodeName;
		trace("len==1==" + xmlNodeName);
		if (xmlNodeName == "img")
		{
			trace("图像值===" + Object(getxmlNode.attributes).source);
			if (Object(getxmlNode.attributes).source == "[object DisplayContainerSprite]")
			{
				var tempObj:Object=new Object();
				tempObj.type=Object(getxmlNode.attributes).objectKind;
				tempObj.width=Object(getxmlNode.attributes).width
				tempObj.height=Object(getxmlNode.attributes).height
				tempObj.path=Object(getxmlNode.attributes).objectUrl
				imgArr.push(tempObj)
			}
		}
	}
	
	if (getxmlNode.childNodes.length > 1)
	{
		for (var i:int=0; i < getxmlNode.childNodes.length; i++)
		{
			doCheckNodes(getxmlNode.childNodes[i])
		}
	}
}


1.解析数据,并把图像保存,以便以后图像,影音的操作,如用于下面一段代码:
TextLayoutImporter.as
		/*********************************************************************8
		 * 
		 * 从xml文件创建ige
		 * 
		 * ******************************************************************/
		private var imgElem:InlineGraphicElement 
		public function createInlineGraphicFromXML(xmlToParse:XML):InlineGraphicElement
		{				
			imgElem= new InlineGraphicElement();
			
			parseStandardFlowElementAttributes(imgElem,xmlToParse,_ilgElementFormatImporters);
			
			if (_ilgFormatImporter.result)
			{
				trace("_ilgFormatImporter.result"+_ilgFormatImporter.result)
				var source:String = _ilgFormatImporter.result["source"];
				//imgElem.source = source;
				// if not defined then let InlineGraphic set its own default
				imgElem.height = _ilgFormatImporter.result["height"];
				imgElem.width  = _ilgFormatImporter.result["width"];
				trace("imgElem.width----"+imgElem.width)
				/*	We don't support rotation yet because of bugs in the player. */		
				// imgElem.rotation  = InlineGraphicElement.heightPropertyDefinition.setHelper(imgElem.rotation,_ilgFormatImporter.result["rotation"]);
				imgElem.float = _ilgFormatImporter.result["float"];
				//add
				imgElem.objectUrl=_ilgFormatImporter.result["objectUrl"];
				imgElem.objectKind=_ilgFormatImporter.result["objectKind"];
				//imgElem.source = source;	
				var imgUrl:String=imgElem.objectUrl;
				
				if(imgElem.objectUrl){
				    imgElem.source=DisplayObject(imgParser(imgUrl))
					//imgElem.source=timer_timer(imgUrl)
				}else{
					imgElem.source = source;	
				}
				
			}
			return imgElem;
		}

		private function imgParser(imgUrl:String):Object{
			var len:int=TextFlowImageObjectConstants.imagesInTextFlow.length;
			trace("图像数据长=="+len)
			var reObj:Object
			for(var j:int=0;j<len;j++){
				if(imgUrl==TextFlowImageObjectConstants.imagesInTextFlow[j].path){
					reObj=TextFlowImageObjectConstants.imagesInTextFlow[j].displayObj
					break;
				}
			}
				return reObj;
		}




我已把修改了的flashx包传至你邮箱.
祝你成功!
1 楼 xhc66 2011-02-22  
楼主您好,我看过您写的那个《Flex图文混排》的帖子,当时是Flex 4 beta版本的,现在这个帖子应该是4.5版本的,变化应该挺大,我导入了原来beta版的,但是我用的是SDK 4.5,有很多API变化了,试着没调整成功,不知道您是否有4.5版本的代码可供学习参考,z6feitian@163.com 非常感谢!

相关推荐

    一些有关哈希函数的随记

    这篇随记将探讨哈希函数的基本概念、性质以及在实际应用中的重要性。 哈希函数,也称为散列函数,是一种特殊的算法,它将任意长度的输入(也称为预映射或消息)转化为固定长度的输出,这个输出通常被称为哈希值或...

    互联网公司实习日记随记参考.pdf

    互联网公司实习日记随记参考.pdf互联网公司实习日记随记参考.pdf互联网公司实习日记随记参考.pdf互联网公司实习日记随记参考.pdf互联网公司实习日记随记参考.pdf互联网公司实习日记随记参考.pdf

    随记_电气_

    【标题】:“随记_电气_”提示我们这是一份关于电气工程领域的个人笔记或学习心得,可能包含了一些作者在学习或实践中积累的电气知识。 【描述】:“电气相关的知识,随手写的,不知道行不行11111”表明这份文档...

    linux net 管理随记

    linux net 管理随记,留着个人备忘

    面试随记???随时更新

    面试随记???随时更新

    git随记 git

    git随记 git

    c++随记.docx

    ### C++ 随记知识点总结 #### 一、内存管理与 new/delete 操作符 在 C++ 中,`new` 和 `delete` 是用于动态内存分配的关键字。`new` 用于在堆区分配内存,`delete` 用于释放之前通过 `new` 分配的内存。使用 `new`...

    重点小学生寒假记随记大全.doc

    重点小学生寒假记随记大全.doc

    随记app,微博与博客整合

    随记App是一款集成微博与博客功能的毕业设计项目,旨在为用户提供一个统一的平台来管理和分享他们的日常思考和生活点滴。这个项目分为客户端和服务端两部分,分别实现了用户交互界面和后台数据处理。 在Android...

    公司法务实习日记随记三篇.pdf

    公司法务实习日记随记三篇.pdf

    会计专业毕业实习日记随记篇.pdf

    会计专业毕业实习日记随记篇.pdf

    重点小学生母亲节日记随记大全.doc

    重点小学生母亲节日记随记大全.doc

    网络原理随记.pdf

    计算机网络原理随记 在本资源中,我们将讨论计算机网络的基本概念、发展历程、网络架构、协议栈、数据传输、网络互通、安全性等方面的知识点。 计算机网络的基本概念 计算机网络是指将多个计算机设备连接起来,以...

    小学三年级秋游日记随记五篇.pdf

    小学三年级秋游日记随记五篇.pdf

    c#随记.docx

    C#是一种由微软开发的面向对象的编程语言,它结合了C++的高效性和Java的简洁性,被誉为最优秀的编程语言之一。C#是专为.NET框架设计的,因此在.NET环境中具有极高的兼容性和可操作性。.NET Framework包含了公共语言...

    读书笔记:Java并发编程之美阅读随记.zip

    读书笔记:Java并发编程之美阅读随记

    EHCache的使用随记

    **EHCache的使用随记** EHCache是一款广泛应用于Java环境中的高效、易用且功能丰富的内存缓存系统。它能够显著提升应用性能,通过将常用数据存储在内存中,避免了反复从数据库读取,降低了I/O延迟。本文将探讨...

    2021-2022年收藏的精品资料辛辛那提1000维修随记.doc

    【辛辛那提1000维修随记】是一份关于数控系统维修的珍贵文档,主要涉及美国辛辛那提·米拉克龙公司的ACRAMATIC系列数控装置,特别是1994年推出的先进CNC控制系统——A2100。这篇随记详细记录了从1950年代早期的数控...

    活动随记一次“出色”的朗诵会.pdf

    如果文件内容确实如描述中所示,全为“活动随记一次‘出色’的朗诵会.pdf”和一些不明确的符号,那么我将无法从空白或无关的信息中提取知识点。请提供实际的文字内容,以便我进行分析并创作出丰富的内容。

    2015年8月整理笔记本随记.ppt

    这篇随记内容涵盖了多个教育和德育相关的知识点,深入探讨了教育的本质、电子智慧教育的定义、学生文化的理解以及班主任的角色。以下是对这些知识点的详细解释: 1. **教育理念**: - "精准,精减,精彩":这强调...

Global site tag (gtag.js) - Google Analytics