Events not firing on loop?

315 views
Skip to first unread message

jmcm...@martinwilliams.com

unread,
Dec 15, 2015, 1:04:10 PM12/15/15
to Google Web Designer beta
Hello,

I am creating a banner which needs to loop 3 times. The banner uses image sprite animations which do not loop and I am using events to initiate the sprite animations at certain points in the timeline. This is working fine on the initial play-though, but when the animation banner loops the events that trigger the sprites to begin playing don't work on any of the loops.

Any ideas?

Thanks!

jmcm...@martinwilliams.com

unread,
Dec 15, 2015, 1:31:18 PM12/15/15
to Google Web Designer beta
My thought is that when the sprite is done playing, it doesn't switch to the "stopped" state, so once it comes back around to the "play" event, it thinks the animation is already playing. I'm assuming I can fix this by stopping the sprite animations on the final frame so that they can be "played" again when it comes back around. Is there a way to do this with code so I can stop all of the sprite animations with one line of code?

jmcm...@martinwilliams.com

unread,
Dec 15, 2015, 3:20:52 PM12/15/15
to Google Web Designer beta
Alright, so I was able to resolve this by adding 4 events right at the end of the timeline(1 event for each sprite) and using the "New Animation" action to reinitialize each of the sprite animations. This is working fine, but it seems like there should be an easier way to do this. Please let me know if there is a better way to accomplish this.

Thank you.

Sukhbir Kaur

unread,
Dec 17, 2015, 5:08:57 PM12/17/15
to Google Web Designer beta
Hi ,


If you need a SpriteSheet to  loop 3 times at certain point in the timeline . You can add  No. of loop in SpriteSheet under advance settings .






















Then  in  timeline  add an event to play the animation. 

page1>event-1>plays the animaton>gwd-spritesheet_1

















Please see the attached sample  file . 

If this is not your workflow .Please send us your  file at gwd-s...@google.com so I can take a look at it . 

I hope this helps !

Thanks
Sukhbir
(GWD Team)


spritesheettest.zip

jmcm...@martinwilliams.com

unread,
Dec 17, 2015, 5:14:04 PM12/17/15
to Google Web Designer beta
Hi Sukhbir,

Thanks for the response. None of my sprites are supposed to loop they are supposed to play through once each. The problem is that the entire banner, with all 4 sprites, loops 3 times and the individual sprites would only play through the first time the banner played through.

As I mentioned, I was able to resolve this by reinitializing the animation of each sprite using the "New Animation" event, just wondering if there is a better way of achieving this?

Message has been deleted

bortignon

unread,
Dec 17, 2015, 5:40:11 PM12/17/15
to Google Web Designer beta
Hi, 
unfortunately since the sprite component and the time animation rely on different animation models, the right way to achieve what you had in mind is exactly adding an extra event at the end of the animation.

In this way, during the next animation cycle, the sprite sheet will be reinitialized as new.

jmcm...@martinwilliams.com

unread,
Dec 17, 2015, 5:42:56 PM12/17/15
to Google Web Designer beta
Thank you for the responses, I appreciate it!
Reply all
Reply to author
Forward
0 new messages