6 Replies Latest reply on Nov 1, 2013 8:02 AM by resdesign

    Placing the getPosition() function within the correct handler

    clavin007 Level 1

      Hi All,


      I have checked through the Edge Animate API and there is a function called getPosition() which returns the current position of the playhead like so :


      if (sym.getPosition() == 0) {

      alert("something happens");



      else if(sym.getPosition() == 4000){

      alert("another thing happens");



      Does anyone know which event handler should I insert this code in? If I placed this within the playhead at frame 0, It will only check once and ignore the else ifs. I noticed that if I insert this within the CompositionReady, it wouldn't work at all.


      If I don't use this method to find the prevailing position of the playhead, then I have to tediously add in the codes to different timed intervals which is not a good practice and maintanance is unwieldly.


      What gives?