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

Object Fitting Keyboard Shortcuts Disfuntional

Markers not showing up after opening a saved project. Where did they go!?

Photoshop javascript: Open files in all subfolders