<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Drag&#8217;n&#039;drop from HTML to Flash</title>
	<atom:link href="http://techblog.floorplanner.com/2008/11/06/dragndrop-from-html-to-flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://techblog.floorplanner.com/2008/11/06/dragndrop-from-html-to-flash/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 20 Nov 2009 23:38:19 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Willem van Bergen</title>
		<link>http://techblog.floorplanner.com/2008/11/06/dragndrop-from-html-to-flash/comment-page-1/#comment-184</link>
		<dc:creator>Willem van Bergen</dc:creator>
		<pubDate>Mon, 24 Nov 2008 11:04:59 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.floorplanner.com/?p=247#comment-184</guid>
		<description>Thanks for reporting this. We will certainly address this issue, as it is indeed very counter-intuitive.</description>
		<content:encoded><![CDATA[<p>Thanks for reporting this. We will certainly address this issue, as it is indeed very counter-intuitive.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: makc</title>
		<link>http://techblog.floorplanner.com/2008/11/06/dragndrop-from-html-to-flash/comment-page-1/#comment-182</link>
		<dc:creator>makc</dc:creator>
		<pubDate>Sun, 23 Nov 2008 18:04:50 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.floorplanner.com/?p=247#comment-182</guid>
		<description>There&#039;s a little bug though, if you drag and drop in 3D mode, and then go back in 2D, you see that drops were not ignored. Ok, maybe that&#039;s not a bug, but dropping something onto invisible view is counter-intuitive at least.</description>
		<content:encoded><![CDATA[<p>There&#8217;s a little bug though, if you drag and drop in 3D mode, and then go back in 2D, you see that drops were not ignored. Ok, maybe that&#8217;s not a bug, but dropping something onto invisible view is counter-intuitive at least.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Willem van Bergen</title>
		<link>http://techblog.floorplanner.com/2008/11/06/dragndrop-from-html-to-flash/comment-page-1/#comment-177</link>
		<dc:creator>Willem van Bergen</dc:creator>
		<pubDate>Thu, 20 Nov 2008 15:52:35 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.floorplanner.com/?p=247#comment-177</guid>
		<description>I can give you some details about the Javascript implementation. We use the Draggable object from Prototype to implement this. However, there are a lot of gotchas that you have to take into account. We have therefore implemented some event handlers of the Draggable object to overcome those.
&lt;ul&gt;
	&lt;li&gt; Once the drag action starts, we register the element as new object in the Floorplanner application using a Javascript API call. Because the mouse is not over the Flash application, we make sure it is not yet visible. &lt;/li&gt;

	&lt;li&gt;The &quot;ghosting&quot; functionality of Draggable will make browsers crash, so we emulate this behavior by  placing two pictures on top of eachother. The top image will be the one that is being dragged, the bottom one will remain in the sidebar.
&lt;/li&gt;
	&lt;li&gt;We catch the mousemove events to update the position of the element in the Floorplanner application, again by a JS API call. The z-index of the Floorplanner application should be higher than the z-index of the picture that is being dragged, so the picture will be dragged UNDER the Floorplanner Flash application.&lt;/li&gt;

	&lt;li&gt;When the element is being dropped on the Flash application, the element is on the correct position. Note that the picture that was being dragged is now UNDER the Flash application. We update the location of this picture to its former location. The &quot;auto-revert&quot; option of Draggable will make some browsers crash, so we had to emulate it!&lt;/li&gt;

	&lt;li&gt;When an element is dropped outside the Flash application, the element is removed from the Floorplanner application by a JS API call and we move the picture that was being dragged to its former location, on top of the &quot;ghost-image&quot;. Determining whether the element is being dropped on the flash application or outside of it has some gotchas in Firefox if I remember correctly, so be aware of those.&lt;/li&gt;

&lt;/ul&gt;

Hopefully this clarifies the implementation a bit! As a last remark, you really have to be careful with Javascripts events in different browsers when Flash is involved. Some browsers simply will not fire an event, other events will not bubble correctly and some events have different parameters among the different browsers. This makes it really tricky to get it right.</description>
		<content:encoded><![CDATA[<p>I can give you some details about the Javascript implementation. We use the Draggable object from Prototype to implement this. However, there are a lot of gotchas that you have to take into account. We have therefore implemented some event handlers of the Draggable object to overcome those.</p>
<ul>
<li> Once the drag action starts, we register the element as new object in the Floorplanner application using a Javascript API call. Because the mouse is not over the Flash application, we make sure it is not yet visible. </li>
<li>The &#8220;ghosting&#8221; functionality of Draggable will make browsers crash, so we emulate this behavior by  placing two pictures on top of eachother. The top image will be the one that is being dragged, the bottom one will remain in the sidebar.
</li>
<li>We catch the mousemove events to update the position of the element in the Floorplanner application, again by a JS API call. The z-index of the Floorplanner application should be higher than the z-index of the picture that is being dragged, so the picture will be dragged UNDER the Floorplanner Flash application.</li>
<li>When the element is being dropped on the Flash application, the element is on the correct position. Note that the picture that was being dragged is now UNDER the Flash application. We update the location of this picture to its former location. The &#8220;auto-revert&#8221; option of Draggable will make some browsers crash, so we had to emulate it!</li>
<li>When an element is dropped outside the Flash application, the element is removed from the Floorplanner application by a JS API call and we move the picture that was being dragged to its former location, on top of the &#8220;ghost-image&#8221;. Determining whether the element is being dropped on the flash application or outside of it has some gotchas in Firefox if I remember correctly, so be aware of those.</li>
</ul>
<p>Hopefully this clarifies the implementation a bit! As a last remark, you really have to be careful with Javascripts events in different browsers when Flash is involved. Some browsers simply will not fire an event, other events will not bubble correctly and some events have different parameters among the different browsers. This makes it really tricky to get it right.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Ivanov</title>
		<link>http://techblog.floorplanner.com/2008/11/06/dragndrop-from-html-to-flash/comment-page-1/#comment-168</link>
		<dc:creator>Mike Ivanov</dc:creator>
		<pubDate>Wed, 19 Nov 2008 05:25:57 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.floorplanner.com/?p=247#comment-168</guid>
		<description>Very cool and seamless!  Can you share a bit about the implementation details?</description>
		<content:encoded><![CDATA[<p>Very cool and seamless!  Can you share a bit about the implementation details?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
