1 Reply Latest reply on Dec 9, 2008 10:20 AM by RossRitchey

    dropTarget reading Loader component

    RossRitchey Level 4
      Alright, so I have a drag/drop interaction that works 100% standalone. I need to load it into a Loader component, which is where the problems come in.

      I am testing if the object is being dropped in the correct place using the dropTarget parameter of the event. The problem is, when the SWF is loaded into a Loader component, the dropTarget always reads out the Loader, not the object that is in the SWF.

      I will attach the entire code for the SWF, even though I doubt it will help to diagnose the problem.


        • 1. Re: dropTarget reading Loader component
          RossRitchey Level 4
          I did some more debugging, and realized that I have a second loader that loads an image with transparency that acts as a border for the content. This image is what the dropTarget was displaying. The image was already set to "mouseEnabled = false" and "mouseChildren = false" though that apparantly doesn't matter. "focusEnabled = false" and "mouseFocusEnabled = false" doesn't change anything either. And some googling tells me that there is currently no method of removing an object from being able to be a dropTarget. Seems like a very large glaring bug to me.

          I resolved the issue by switching to the "hitTestObject" method of checking to see if my objects were on top of their drop point. It doubled the code for that section (15 lines - 37 lines). Just another area where AS3 is bloated unnecessarily.