Advertisement

04.07.2008 at 03:30PM PDT, ID: 23303023
[x]
Attachment Details

AS3.0 Drag and Drop

Asked by rgarimella in Macromedia Flash

Hi Folks,

New to AS3.0 I was trying to find out why the below logic/drop wont work

I have 2 drag mc's redlead_mc and blacklead_mc

I have 2 drop zones drop_redlead_mc, and drop_blacklead_mc

If I drag the redlead_mc first on the drop area the trace("correct feedback Red"); gets called correctly,

and I drag blacklead_mc to the drop area instead of    trace("correct feedback Black"); i see in the output
trace("correct feedback Red");

Any ideas why I dont see the  trace("correct feedback Black"); when I drag the blacklead_mc as a second option.

Thanks
RG

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
function drop(event:MouseEvent):void {
	event.target.stopDrag();
 
	if (redlead_mc.hitTestObject(drop_redlead_mc) == true) {
		trace("correct feedback Red");
		
	}else if (blacklead_mc.hitTestObject(drop_blacklead_mc) == true) {	
                trace("correct feedback Black");
	} else {
		trace("incorrect feedback called");
 
	}	
}
[+][-]04.08.2008 at 09:42AM PDT, ID: 21307059

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.08.2008 at 12:18PM PDT, ID: 21308627

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.08.2008 at 07:06PM PDT, ID: 21311344

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.08.2008 at 07:08PM PDT, ID: 21311352

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.08.2008 at 07:10PM PDT, ID: 21311359

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Macromedia Flash
Sign Up Now!
Solution Provided By: julianopolito
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628