Drag and Drop an Array of items onto a matrix of items


how convert code drag single item onto single target? using array approach keep copy pasting code gazillion times.

 

 

// insert code run when symbol created here

yepnope({nope:['jquery-ui-1.10.3.custom.min.js','jquery.ui.touch-punch.min.js'], complete: init});

 

 

 

 

function init(){

          sym.$('mx1').draggable({opacity:.5, revert:'invalid'});

          sym.$('mx1').sortable({zindex: 0 });

 

          sym.$('mx198').droppable({

            accept:sym.$("mx1"),

                    drop: function() {

                              sym.getsymbol("mx1").play("over");

                    }

                    }

          );

 

          sym.$('btn_mx1_home').droppable({

  accept:sym.$("mx1"),

                    drop: function() {

                              sym.getsymbol("mx1").play("up");

                    }

                    }

          );

}

 

 

draggables "mx1", "mx2", "mx3", "mx4", "mx5"... "mx40"

targets "mx198", "d1", "d2", "d3", "d4"

 

when draggable drug, needs above other items.

 

any appreciated!



More discussions in Edge Animate CC


adobe

Comments

Popular posts from this blog

how to devide a circle into equal parts

"Could not fill because there are not enough opaque source pixels" - not solved by any other thread

Why can't I change the billing info for my account?