I have given the target object the same name as (possible more then 1)
dragobject(s).
So now I am trying to check them like this:
If( dragObj.dropTarget.name == dragObj.name){//}
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nathan
Mynarcik
Sent: donderdag 12 augustus 2010 16:05
To: Flash Coders List
Subject: Re: [Flashcoders] I have a drag and drop question.
So, are you trying to get the name of the object that was dropped? or the
name of what the object that was dropped landed on?
Nathan Mynarcik
[email protected]
254.749.2525
www.mynarcik.com
On Thu, Aug 12, 2010 at 8:36 AM, Cor <[email protected]> wrote:
> I have a drag and drop question.
>
> In my Drag_Drop_Question class, I position several images (loaded with
> another class) dynamically on stage.
> These are my targets.
> And I do the same for a bunch of images, which are the objects to drag to
> their target.
> Now every time I drop my dragged image I should get the dropTarget.
> Trace(e.target.dropTarget); // null
> Trace(e.target.dropTarget.parent); // Error #1009
>
> But they are null or Error #1009.
>
> I did some more tracing of the object and his name:
> trace(e.target.parent.parent.parent.parent.parent.parent,
> e.target.parent.parent.parent.parent.parent.parent.name);
> //[object Stage] null
> trace(e.target.parent.parent.parent.parent.parent,
> e.target.parent.parent.parent.parent.parent.name);
> //[object Main] root1
> trace(e.target.parent.parent.parent.parent,
> e.target.parent.parent.parent.parent.name);
> //[object MovieClip] instance15
> trace(e.target.parent.parent.parent,
> e.target.parent.parent.parent.name);
> //[object Sleepvraag] instance121
> trace(e.target.parent.parent, e.target.parent.parent.name);
> //[object Sprite] instance133
> trace(e.target.parent, e.target.parent.name);
> //[object Sprite] instance191
> trace(e.target, e.target.name);
> //[object Image] 7
>
> Any help is appreciated!
>
> Regards
> Cor
>
>
>
>
>
>
> ------------------------------------
>
> Flash_Tiger Mailing ListYahoo! Groups Links
>
> <*> To visit your group on the web, go to:
> http://groups.yahoo.com/group/Flash_tiger/
>
> <*> Your email settings:
> Individual Email | Traditional
>
> <*> To change settings online go to:
> http://groups.yahoo.com/group/Flash_tiger/join
> (Yahoo! ID required)
>
> <*> To change settings via email:
> [email protected]
> [email protected]
>
> <*> To unsubscribe from this group, send an email to:
> [email protected]
>
> <*> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
> Geen virus gevonden in het binnenkomende-bericht.
> Gecontroleerd door AVG - www.avg.com
> Versie: 9.0.851 / Virusdatabase: 271.1.1/3061 - datum van uitgifte:
> 08/10/10
> 20:34:00
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 9.0.851 / Virusdatabase: 271.1.1/3063 - datum van uitgifte: 08/10/10
20:34:00
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders