Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Need help with Edge Animate: Drag and Drop

$
0
0

Im having trouble making symbols which are not accepted by the basket symbol, return to their original position once they have been rejected

 

//load jquery

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

 

 

//set counter

sym.setParameter("counter", 0);

 

 

//create variable to count the number of "right" drops

var semafor = sym.composition.getStage().getParameter("counter");

 

 

//define function init()

function init(){

 

 

 

 

//define draggable items and set scope to items that get accepted by droppable

sym.$("Banana").draggable({scope:"gear"});

sym.$("Banana1").draggable({scope:"gear"});

sym.$("Orange").draggable();

sym.$("Apple").draggable();

 

 

 

 

 

 

//define droppable and the scope it accepts

sym.$("basket").droppable(

{scope:"gear"},

 

 

//define what happens when an item is dropped

{drop: function() {

semafor = semafor + 1;

sym.getComposition().getStage().$("brpredmeta_txt").html(semafor);}

}

 

 

)

}

//load jquery

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

 

 

//set counter

sym.setParameter("counter", 0);

 

 

//create variable to count the number of "right" drops

var semafor = sym.composition.getStage().getParameter("counter");

 

 

//define function init()

function init(){

 

 

 

 

//define draggable items and set scope to items that get accepted by droppable

sym.$("Banana").draggable({scope:"gear"});

sym.$("Banana1").draggable({scope:"gear"});

sym.$("Orange").draggable();

sym.$("Apple").draggable();

 

 

 

//define droppable and the scope it accepts

sym.$("basket").droppable(

{scope:"gear"},

 

 

//define what happens when an item is dropped

{drop: function() {

semafor = semafor + 1;

sym.getComposition().getStage().$("brpredmeta_txt").html(semafor);}

}

 

 

)

}


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>