2 Replies Latest reply on Jan 21, 2013 8:32 AM by jdhughen

    Animate from user selected position on the stage

    jdhughen Level 1

      I have a new idea I'm playing with. I want the user to click on the screen (ie stage) and create an element then animate that element to a fixed location on the stage, once the element has reached the desired location then play an animation on the timeline from location "start". I've found a way to click create the element so what I need now is a way to animate, with code, the element from where the user clicked/created to where I want it to be, with a ease in/out. When the users clicks they are creating var "word1" Which is an instance of a sym text animation of the word "ways".


      This is the code for stage.mousedown


      var word1 = sym.createChildSymbol("ways", "Stage");
      var word1Element = word1.getSymbolElement();
      var posX = (e.pageX- ($(word1Element).width()/2)) + "px";
      var posY = (e.pageY- ($(word1Element).height()/2)) + "px";
      sym.$(word1Element).css({"position":"absolute", "top":posY, "left":posX});
      //to this point it works as desired...
      //animate code goes here... animate from the above creation point to x=60px , y=350px with a ease in/out



      Any suggestions and direction would be appreciated



      Joel H