3 Replies Latest reply on Jul 9, 2014 3:35 PM by healthyaddiction

    Dragging nested symbols

    healthyaddiction

      I've been trying to create a function that will allow me to drag and drop different images nested within symbols.

       

      The code on theimage looks like this:

       

      sym.getComposition().getStage().dragDrop("anti-virus");

       

      The function I put on the top stage's CompositionReady event.

       

      sym.dragDrop = function(item) {

        sym.$(item).draggable({ opacity: 0.35, revert: "invalid" });

        sym.$("SoftwareBox").droppable({ accept: sym.$(item) });

      }

       

      This doesn't work though.  The "anti-virus" image is within a symbol called "hardwaresoftware" which is in turn within a symbol called "article02".

       

      Does anyone know what I've done wrong.  If I write the drag code directly in the image it works fine, i've tried doing an exact path to the image, symbol by symbol but that doesn't seem to work.  I used an alert to make sure the dragDrop function is running and it is.

       

      Any help would be hugely appreciated.

       

      Thanks