<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Stanislav Stankov &#187; flex 3</title>
	<atom:link href="http://blog.stanislavstankov.com/category/flex-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stanislavstankov.com</link>
	<description></description>
	<lastBuildDate>Sun, 05 Feb 2012 22:33:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/bg/</creativeCommons:license>
		<item>
		<title>Flex Drag and Drop with dynamic image</title>
		<link>http://blog.stanislavstankov.com/2010/03/flex-drag-and-drop-with-dynamic-image/</link>
		<comments>http://blog.stanislavstankov.com/2010/03/flex-drag-and-drop-with-dynamic-image/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 16:42:10 +0000</pubDate>
		<dc:creator>Stanislav Stankov</dc:creator>
				<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[flex 3]]></category>

		<guid isPermaLink="false">http://blog.stanislavstankov.com/?p=243</guid>
		<description><![CDATA[Hey I was searching in internet how to do a drag that create a exact copy of the image without loading it. All the examples were with Embed images so i needed some example that Image load bitmap and then do drag without having to load bitmap twice. So take a look: 1234567891011// fire from [...]]]></description>
			<content:encoded><![CDATA[<p>Hey I was searching in internet how to do a drag that create a exact copy of the image without loading it. All the examples were with Embed images so i needed some example that Image load bitmap and then do drag without having to load bitmap twice. So take a look:</p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900; font-style: italic;">// fire from MouseEvent.MOUSE_DOWN event</span><br />
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> doDrag<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">MouseEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> dragInitiator<span style="color: #000066; font-weight: bold;">:</span>Image = e<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">currentTarget</span> <span style="color: #0033ff; font-weight: bold;">as</span> Image<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> dragSource<span style="color: #000066; font-weight: bold;">:</span>DragSource = <span style="color: #0033ff; font-weight: bold;">new</span> DragSource<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; dragSource<span style="color: #000066; font-weight: bold;">.</span>addData<span style="color: #000000;">&#40;</span>_core<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;core&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> dragProxy<span style="color: #000066; font-weight: bold;">:</span>Image = <span style="color: #0033ff; font-weight: bold;">new</span> Image <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; dragProxy<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">source</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Bitmap</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>dragInitiator<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">content</span> <span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #004993;">Bitmap</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">bitmapData</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; DragManager<span style="color: #000066; font-weight: bold;">.</span>doDrag<span style="color: #000000;">&#40;</span>dragInitiator<span style="color: #000066; font-weight: bold;">,</span> dragSource<span style="color: #000066; font-weight: bold;">,</span> e<span style="color: #000066; font-weight: bold;">,</span> dragProxy<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span></div></td></tr></tbody></table></div>
<p>Spinets used:<br />
<a href="http://www.switchonthecode.com/tutorials/simple-flex-drag-and-drop">Simple Flex Drag and Drop</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stanislavstankov.com/2010/03/flex-drag-and-drop-with-dynamic-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/bg/</creativeCommons:license>
	</item>
	</channel>
</rss>

