"On animation finished" triggers

Report Construct 2 bugs here.

Post » Sat Mar 26, 2016 10:59 am

Problem Description
"On animation finished"-triggered events don't happen within the same frame on some browsers. Works in Firefox, but not chrome, edge/explorer or NWJS.

Attach a Capx

Description of Capx
A sprite animation with colored circles that move upwards plays so to give the illusion of upward motion. The same sprite is moved at the end of the animation and start over so it appears as if the balls continue moving, when in fact its the same sprite.

Steps to Reproduce Bug
  • Start capx in one of the affected browsers.
  • As the balls reach the small beige rectangles notice now a circle appears to "pop" (for a single frame so keep your eyes peeled)

Observed Result
The sprite get its new position before retriggering its animation, even though the events suggest that it should restart the animation and get the new position during the same frame.

Expected Result
No poppin but a smooth (though incremental) continuation of the sprite movement.

Affected Browsers
  • Chrome: YES
  • FireFox: NO
  • Internet Explorer: YES

Operating System and Service Pack
Win 10 pro

Construct 2 Version ID
r225 beta, also tested on r221 stable with identical results.
Posts: 28
Reputation: 546

Post » Sun Mar 27, 2016 8:35 pm

The same in Windows 7, C2 r221, Chrome 49.0.2623.87.

As a workaround you can set a "wait 0" action before changing the position.
Posts: 19
Reputation: 660

Post » Sun Mar 27, 2016 9:02 pm

Awesome, thanks juani!

BTW I noticed I could get the same faulty behaviour happening in Firefox as well, but in a different example. Haven't tried reproducing it in a simplified environment like in the attached example, still maybe an indication that somethings's fishy all across.
Posts: 28
Reputation: 546

Return to Bugs

Who is online

Users browsing this forum: AMD and 0 guests