<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>^;^ 失落的微点 &#187; Flex</title>
	<atom:link href="http://www.porry.org/tag/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.porry.org</link>
	<description>独挡千古错...冷漠自逍遥...</description>
	<lastBuildDate>Thu, 02 Feb 2012 10:46:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Flex中的拖拽</title>
		<link>http://www.porry.org/2010/04/20/flex-dragdrop-event/</link>
		<comments>http://www.porry.org/2010/04/20/flex-dragdrop-event/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 20:56:52 +0000</pubDate>
		<dc:creator>^;^</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[DragManager]]></category>
		<category><![CDATA[DragSource]]></category>

		<guid isPermaLink="false">http://www.porry.org/?p=103</guid>
		<description><![CDATA[一.通DragManager管理拖拽事件 // 处理拖拽中的数据传递 var dragSource: DragSource = new DragSource(); dragSource.addData(event.currentTarget, "pageItems"); // 自定义拖拽图标 var dragImage : DragAndResizeLine = new DragAndResizeLine(); dragImage.width = IUIComponent(event.currentTarget).width; dragImage.height = 14; // 拖拽 DragManager.doDrag(event.currentTarget, dragSource, MouseEvent(event), dragImage); ==================== DragManager.doDrag( dragInitiator：派发拖拽事件的目标对象 dragSource：拖拽中的数据源，用来传递数据。通过定义DragSource对象来设置数据源，该对象的方法 addData(obj, &#8220;name&#8221;) 可以添加数据。然后使用dataForFormat(&#8220;name&#8221;) 来获取数据，使用前用hasFormat(&#8220;name) 来判断是否存在该对象。 mouseEvent：鼠标事件对象，包含了拖拽事件开始时的鼠标信息 dragImage：可选，一个可视化的Flex 组件，用来代替目标对象的显示，将在拖拽过程中一直跟随鼠标。如果没有指定，默认会使用一个矩形来代替。 xOffset：x坐标位移量，默认0，表示dragImage 和 目标对象左端的距离 yOffset：y坐标位移量，默认0，表示dragImage 和 目标对象顶端的距离 imageAlpha：默认0.5，表示 dragImage 的透明度，0～1 allowMove：是否允许移动，默认true，实际上这个属性不影响动作 ); [...]]]></description>
			<content:encoded><![CDATA[<p><strong>一.通DragManager管理拖拽事件</strong><br />
<code><br />
// 处理拖拽中的数据传递<br />
var dragSource: DragSource = new DragSource();<br />
dragSource.addData(event.currentTarget, "pageItems");</p>
<p>// 自定义拖拽图标<br />
var dragImage : DragAndResizeLine = new DragAndResizeLine();<br />
dragImage.width = IUIComponent(event.currentTarget).width;<br />
dragImage.height = 14;</p>
<p>// 拖拽<br />
DragManager.doDrag(event.currentTarget, dragSource, MouseEvent(event), dragImage);</code></p>
<blockquote><p>====================<br />
DragManager.doDrag(<br />
dragInitiator：派发拖拽事件的目标对象<br />
dragSource：拖拽中的数据源，用来传递数据。通过定义DragSource对象来设置数据源，该对象的方法 addData(obj, &#8220;name&#8221;) 可以添加数据。然后使用dataForFormat(&#8220;name&#8221;) 来获取数据，使用前用hasFormat(&#8220;name) 来判断是否存在该对象。<br />
mouseEvent：鼠标事件对象，包含了拖拽事件开始时的鼠标信息<br />
dragImage：可选，一个可视化的Flex 组件，用来代替目标对象的显示，将在拖拽过程中一直跟随鼠标。如果没有指定，默认会使用一个矩形来代替。<br />
xOffset：x坐标位移量，默认0，表示dragImage 和 目标对象左端的距离<br />
yOffset：y坐标位移量，默认0，表示dragImage 和 目标对象顶端的距离<br />
imageAlpha：默认0.5，表示 dragImage 的透明度，0～1<br />
allowMove：是否允许移动，默认true，实际上这个属性不影响动作<br />
);<br />
====================</p></blockquote>
<p><strong>二.拖拽操作中最少有两个对象：被拖动的对象、接收方的对象。</strong><br />
　　被拖动的对象，可设置的事件有mouseDown：鼠标按下。mouseMove：鼠标移动。dragComplete：鼠标释放（判断是否拖放成功）。<br />
　　接收方的对象，可设置的事件为dragEnter：被拖动对象移动到接收范围时。dragOver：鼠标移动到接收方上。dragDrop：鼠标在接收方上松开。dragExit：被拖动对象被拖离接收方范围。<br />
<code>       private function dragEnterHandler(event: DragEvent) : void {<br />
           // 判断当前拖入的对象，是否是想要接收的对象<br />
           if (event.dragSource.hasFormat("pageItems")) {<br />
// 同意接收当前拖入的对象<br />
              DragManager.acceptDragDrop(event.currentTarget);<br />
           }<br />
       }</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.porry.org/2010/04/20/flex-dragdrop-event/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TextLayout</title>
		<link>http://www.porry.org/2009/12/18/textlayout/</link>
		<comments>http://www.porry.org/2009/12/18/textlayout/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 19:39:04 +0000</pubDate>
		<dc:creator>^;^</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[TextLayout]]></category>

		<guid isPermaLink="false">http://www.porry.org/?p=27</guid>
		<description><![CDATA[相关的网站 http://labs.adobe.com/technologies/textlayout http://labs.adobe.com/technologies/textlayout/demos/ http://livedocs.adobe.com/labs/textlayout/ http://livedocs.adobe.com/flex/gumbo/langref/]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: 13px; line-height: 1.3em;">相关的网站</span></p>
<div id="blogDetailDiv" style="font-size: 16px;"><span style="font-size: 13px; line-height: 1.3em;"> <a href="http://labs.adobe.com/technologies/textlayout" target="_blank">http://labs.adobe.com/technologies/textlayout</a></span><br />
<span style="font-size: 13px; line-height: 1.3em;"> <a href="http://labs.adobe.com/technologies/textlayout/demos/" target="_blank">http://labs.adobe.com/technologies/textlayout/demos/</a> </span><br />
<span style="font-size: 13px; line-height: 1.3em;"> <a href="http://livedocs.adobe.com/labs/textlayout/" target="_blank">http://livedocs.adobe.com/labs/textlayout/</a></span><br />
<span style="font-size: 13px; line-height: 1.3em;"> <a href="http://livedocs.adobe.com/flex/gumbo/langref/" target="_blank">http://livedocs.adobe.com/flex/gumbo/langref/</a></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.porry.org/2009/12/18/textlayout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

