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

Overwriting Keyframes with jQuery

$
0
0

Hello hello,

I've got a little challenge that I cannot seem to crack.

The situation is as following:

 

I've got an element on my stage. I animated its position to move from here to there.

Now, I want to be able to interrupt that movement, so that when a button is pressed, the element moves to a different place (let's say the top left corner).

As long as I have no keyframes my code seems to work fine.

 

sym.$("myElement").animate({

  "left": 0,

  "top": 0

});

 

The element can be placed wherever on my stage, and when the .animate() function is called, it moves to where it should.

 

However, as soon as I have keyframes on the properties that I want to animate, nothing happens. Even when I stop my timeline.

 

Any ideas?

 

Cheers,

Lennert


Viewing all articles
Browse latest Browse all 9897

Trending Articles



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