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

Is it possible to have a droppable event happen just once?

$
0
0

Hi,

 

I have a character that when entering a droppable area, triggers an animation to occur. However, I only want this to happen once and not every time my character enters the droppable area, can you help me to achieve this?

 

here is my code:

 

var container = sym.$("container");

 

 

  sym.$("ALF").draggable({ containment: container });

 

 

sym.$('ALF').draggable({

      start: function() {

       sym.getSymbol('ALF').play();

 

 

 

 

 

 

       // Play an audio track

       sym.getSymbol("walkSound").$("step")[0].play();

     },

 

 

 

 

     stop: function() {

        sym.getSymbol('ALF').stop();

        sym.getSymbol("walkSound").$("step")[0].pause();

      }

});

 

 

  //Droppable... on the target!

  sym.$('DOCKSPACE').droppable({drop: function() {sym.getSymbol("SUBRISE").play();}});


Viewing all articles
Browse latest Browse all 9897

Trending Articles



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