danzen / zimjs

ZIM JavaScript Canvas Framework - Code Creativity! Interactive Media For All.
Other
507 stars 47 forks source link

Drag make animation weird in ZIMSHIM (adobe animate) #46

Closed BibbyChung closed 2 years ago

BibbyChung commented 2 years ago

Hi there,

I got a weird situation. I watch this tutorial https://youtu.be/xjAyf3my2Bw and do the same thing. all things work well. But I add a new MovieClip and make it move loopy by itself. When I drag a ball, the ball move become fast a lot. And when I stop drag, anything works well as before.

I make the example in codepen and here is my adobe animate file a01.fla.zip

those I use.

<script src="https://zimjs.org/cdn/1.3.4/createjs.js"></script>
<script src="https://zimjs.org/cdn/00/zim_min.js"></script>

Thanks

danzen commented 2 years ago

Hi Bibby - not sure why the MovieClip animation would increase in speed. While dragging we are adding a stage.update() on pressmove. When using ZIM, we add all these to a single Ticker. If you remove the createjs ticker and add a ZIM one then it solves the problem.

image

BibbyChung commented 2 years ago

Hi @danzen,

It works well. Thank you so much.