<?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: AS3 Buttons and Drag &amp; Drop</title>
	<atom:link href="http://www.isgoodstuff.com/2008/06/10/actionscript-30-buttons-and-drag-drop/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.isgoodstuff.com/2008/06/10/actionscript-30-buttons-and-drag-drop/</link>
	<description>All the good stuff here!</description>
	<lastBuildDate>Thu, 09 Feb 2012 13:10:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: Alex T.</title>
		<link>http://www.isgoodstuff.com/2008/06/10/actionscript-30-buttons-and-drag-drop/comment-page-1/#comment-1881</link>
		<dc:creator>Alex T.</dc:creator>
		<pubDate>Thu, 09 Feb 2012 13:10:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.isgoodstuff.com/?p=67#comment-1881</guid>
		<description>use a enterFrame listener to check the events of dragdrop success. If any of the box is dragged correctly. Snap the movieclip (disable it&#039;s drag functionality) and add a score counter e.g. CorrectHit++

stage.addEvenListener(Event.ENTER_FRAME, checkDragDropChecker );
function checkDragDropChecker {
     if (CorrectHit &gt;= 7){
           funcGoNextFrame();
     }
}</description>
		<content:encoded><![CDATA[<p>use a enterFrame listener to check the events of dragdrop success. If any of the box is dragged correctly. Snap the movieclip (disable it&#8217;s drag functionality) and add a score counter e.g. CorrectHit++</p>
<p>stage.addEvenListener(Event.ENTER_FRAME, checkDragDropChecker );<br />
function checkDragDropChecker {<br />
     if (CorrectHit &gt;= 7){<br />
           funcGoNextFrame();<br />
     }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amer</title>
		<link>http://www.isgoodstuff.com/2008/06/10/actionscript-30-buttons-and-drag-drop/comment-page-1/#comment-1859</link>
		<dc:creator>amer</dc:creator>
		<pubDate>Tue, 31 Jan 2012 16:49:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.isgoodstuff.com/?p=67#comment-1859</guid>
		<description>Hi everybody, can somebody help me with hit test in example
i want to make tests as following:
in the first page I put Drag&amp;Drop test for ordering a sentence,
when the answer is correct I want the test to go next question (next frame)..etc
this is my code
package 
{

	import flash.events.*;
	import flash.display.*;


	public class Map extends MovieClip
	{
		var dragdrops:Array;
		
		


		public function Map()
		{
			// constructor code
			dragdrops = [Go,Going,Did,Are,About,Send,You,]
			var currentObject:DragDrop;
			for (var i:uint = 0; i &lt;dragdrops.length; i++)
			{
				currentObject = dragdrops[i];
				currentObject.target = getChildByName(currentObject.name + &quot;_tar&quot;);
			}
		}
		public function match():void
		{
			
									
		}
				//numOfMatches=0;//
			
		//addChild(win);//
	}

}
and as dragdrop
package 
{
	import flash.events.*;
	import flash.display.*;
	

	public class DragDrop extends Sprite
	{
		var origx = Number;
		var origy = Number;
		var target = DisplayObject;

		public function DragDrop()
		{
			origx = x;
			origy = y;
			// constructor code
			addEventListener(MouseEvent.MOUSE_DOWN,drag);
		}
		function drag (e:MouseEvent):void
		{
			stage.addEventListener(MouseEvent.MOUSE_UP,drop)
			startDrag();
			parent.addChild(this);
		}
		function drop (e:MouseEvent):void
		{
			stage.removeEventListener(MouseEvent.MOUSE_UP,drop)
			stopDrag();
			if (hitTestObject(target))
			{
				visible = false
				target.alpha = 1;
				//Object(parent).match();//
				Object(parent).match();
			}
			
			x = origx;
			y = origy;
		}
		
				
	}
	

}</description>
		<content:encoded><![CDATA[<p>Hi everybody, can somebody help me with hit test in example<br />
i want to make tests as following:<br />
in the first page I put Drag&amp;Drop test for ordering a sentence,<br />
when the answer is correct I want the test to go next question (next frame)..etc<br />
this is my code<br />
package<br />
{</p>
<p>	import flash.events.*;<br />
	import flash.display.*;</p>
<p>	public class Map extends MovieClip<br />
	{<br />
		var dragdrops:Array;</p>
<p>		public function Map()<br />
		{<br />
			// constructor code<br />
			dragdrops = [Go,Going,Did,Are,About,Send,You,]<br />
			var currentObject:DragDrop;<br />
			for (var i:uint = 0; i &lt;dragdrops.length; i++)<br />
			{<br />
				currentObject = dragdrops[i];<br />
				currentObject.target = getChildByName(currentObject.name + &quot;_tar&quot;);<br />
			}<br />
		}<br />
		public function match():void<br />
		{</p>
<p>		}<br />
				//numOfMatches=0;//</p>
<p>		//addChild(win);//<br />
	}</p>
<p>}<br />
and as dragdrop<br />
package<br />
{<br />
	import flash.events.*;<br />
	import flash.display.*;</p>
<p>	public class DragDrop extends Sprite<br />
	{<br />
		var origx = Number;<br />
		var origy = Number;<br />
		var target = DisplayObject;</p>
<p>		public function DragDrop()<br />
		{<br />
			origx = x;<br />
			origy = y;<br />
			// constructor code<br />
			addEventListener(MouseEvent.MOUSE_DOWN,drag);<br />
		}<br />
		function drag (e:MouseEvent):void<br />
		{<br />
			stage.addEventListener(MouseEvent.MOUSE_UP,drop)<br />
			startDrag();<br />
			parent.addChild(this);<br />
		}<br />
		function drop (e:MouseEvent):void<br />
		{<br />
			stage.removeEventListener(MouseEvent.MOUSE_UP,drop)<br />
			stopDrag();<br />
			if (hitTestObject(target))<br />
			{<br />
				visible = false<br />
				target.alpha = 1;<br />
				//Object(parent).match();//<br />
				Object(parent).match();<br />
			}</p>
<p>			x = origx;<br />
			y = origy;<br />
		}</p>
<p>	}</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: build ur own computer</title>
		<link>http://www.isgoodstuff.com/2008/06/10/actionscript-30-buttons-and-drag-drop/comment-page-1/#comment-1727</link>
		<dc:creator>build ur own computer</dc:creator>
		<pubDate>Mon, 05 Dec 2011 13:43:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.isgoodstuff.com/?p=67#comment-1727</guid>
		<description>Useful information. Fortunate me I discovered your website accidentally, and I&#039;m surprised why this accident did not happened in advance! I bookmarked it.</description>
		<content:encoded><![CDATA[<p>Useful information. Fortunate me I discovered your website accidentally, and I&#8217;m surprised why this accident did not happened in advance! I bookmarked it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elektrische Zahnbuerste</title>
		<link>http://www.isgoodstuff.com/2008/06/10/actionscript-30-buttons-and-drag-drop/comment-page-1/#comment-1704</link>
		<dc:creator>Elektrische Zahnbuerste</dc:creator>
		<pubDate>Wed, 30 Nov 2011 01:37:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.isgoodstuff.com/?p=67#comment-1704</guid>
		<description>&lt;strong&gt;... [Trackback]...&lt;/strong&gt;

[...] Read More: isgoodstuff.com/2008/06/10/actionscript-30-buttons-and-drag-drop/ [...]...</description>
		<content:encoded><![CDATA[<p><strong>&#8230; [Trackback]&#8230;</strong></p>
<p>[...] Read More: isgoodstuff.com/2008/06/10/actionscript-30-buttons-and-drag-drop/ [...]&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flash AS 3.0 basic tutorial</title>
		<link>http://www.isgoodstuff.com/2008/06/10/actionscript-30-buttons-and-drag-drop/comment-page-1/#comment-1411</link>
		<dc:creator>Flash AS 3.0 basic tutorial</dc:creator>
		<pubDate>Tue, 01 Feb 2011 11:28:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.isgoodstuff.com/?p=67#comment-1411</guid>
		<description>[...] EXTRA CONCISE TUTORIAL ON UNDERSTANDING EVENT LISTENERS IN ACTION SCRIPT 3.0. TUTORIAL VIA ISGOODSTUFF FOUND HERE [...]</description>
		<content:encoded><![CDATA[<p>[...] EXTRA CONCISE TUTORIAL ON UNDERSTANDING EVENT LISTENERS IN ACTION SCRIPT 3.0. TUTORIAL VIA ISGOODSTUFF FOUND HERE [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ralph</title>
		<link>http://www.isgoodstuff.com/2008/06/10/actionscript-30-buttons-and-drag-drop/comment-page-1/#comment-604</link>
		<dc:creator>Ralph</dc:creator>
		<pubDate>Mon, 29 Nov 2010 23:14:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.isgoodstuff.com/?p=67#comment-604</guid>
		<description>Hi, I would like to ask how to do this in flash:

I want to make a custom designing shirt in flash. Instead of dragging colors on the shirt, i will need to use the actual fabric pattern (in .png or ,jpg format). So how to do that? Please help. Thanks.</description>
		<content:encoded><![CDATA[<p>Hi, I would like to ask how to do this in flash:</p>
<p>I want to make a custom designing shirt in flash. Instead of dragging colors on the shirt, i will need to use the actual fabric pattern (in .png or ,jpg format). So how to do that? Please help. Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

