You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If use two different animation, like one very small object grow to large call it "fadeIn", and second animation when grown object is stay calm - call it "idle".
Made a simple armature and add listener to it to LOOP_COMPLETE event, like that:
in on onLoopComplete change animation from fadeIn to idle, and wise versa.
private function onLoopComplete(event:StarlingEvent):void {
var data:EventObject = event.data as EventObject;
if (data != null) {
const state:String = data.animationState.name;
switch (state) {
case "fadeIn:
armature.animation.play("idle");
break;
case "idle":
armature.animation.play("fadeIn");
break;
}
}
}
And you see that when fadeIn changes to idle it wil blink very noticeably. It occurs because event called not right after loop ended but after it ended and some calculations has made. This means that the event does not called in that frame but in the next.
If fadeIn has 10 frames, it will called in (11 % 10) == first frame. Animation is played succesfully played first frame and then on 2 (12 % 10) frame it will be changed to another animation. But user will see annoying glitch.
Please fix it please.
The text was updated successfully, but these errors were encountered:
I find some workaround. Need to use complete event and play("fadeIn",1); And after it change animations.
It counterintuitive, because default settings in dbpro playing animation with -1 and it makes that you never ever catch COMPLETE event, NEVER. You need or disable that feature by hand or stop animation and play it in next line with parameter 1. If LOOP_COMPLETE called in right time this is workaround not needed.
If use two different animation, like one very small object grow to large call it "fadeIn", and second animation when grown object is stay calm - call it "idle".
Made a simple armature and add listener to it to LOOP_COMPLETE event, like that:
this.armature.addEventListener(EventObject.LOOP_COMPLETE, onLoopComplete);
in on
onLoopComplete
change animation from fadeIn to idle, and wise versa.And you see that when fadeIn changes to idle it wil blink very noticeably. It occurs because event called not right after loop ended but after it ended and some calculations has made. This means that the event does not called in that frame but in the next.
If fadeIn has 10 frames, it will called in (11 % 10) == first frame. Animation is played succesfully played first frame and then on 2 (12 % 10) frame it will be changed to another animation. But user will see annoying glitch.
Please fix it please.
The text was updated successfully, but these errors were encountered: