2 Replies Latest reply on Jul 18, 2009 2:30 PM by Louder6Pounder

    Adding DragEnter at runtime


      Another Drag and drop question.


      I'm creating containers at runtime and i want to allow a user to drag a new container onto a canvas then drag and drop containers into that container.


      The problem is all containers are built at runtime, and i don't see how i can add dragEnter etc to it.  Here is the code i'm using to create the container.



          private function createFieldSet():Box{
                  //  Returns a new Box container set as a field set
                       var newFieldSet:Box = new Box;
                       newFieldSet.width = 400;
                       newFieldSet.height = 50;
                       newFieldSet.setStyle("backgroundColor", 0xa5f48d);
                       newFieldSet.x = 0;
                       newFieldSet.id = idCounter.toString();
                       return newFieldSet;



      So i want to allow a user to drag and drop into this new Box container once it has been created.