I've tried that. It doesn't work either. The new AnimatedImageDrawable is blank(transparent) when set enabled=true. I'm not working on it recently. I'll try again when I have a chance.
Thanks.
A
Andreas Schacherbauer
said
about 7 years ago
Hi Jack, Did you try to create a second AR.AnimatedImageDrawable with it's own AR.ImageResource and replace the animated image drawable at runtime (either on your GeoObject or Trackable2DObject, depending on your use case). You can disable the animated image drawable that you currently don't need, so it's not rendered or animated.
Best regards,
Andreas
J
Jack Lu
said
about 7 years ago
@wikitude stuff:
is it supported by design?
J
Jack Lu
said
about 7 years ago
I use an AnimatedImageDrawable to represent a monster. It plays a default animation infinitely. Now I want to play another animation when user clicks it. I tried change imageResource property to another sprite sheet, but no luck:
monster.imageResource = new AR.ImageResource("assets/monster.lookaround.png"); monster.animate(, 50, -1);
the monster just disappears.
I know I can put all animation frames into one single sprite sheet and use parameter to let animate method play specific frames. I didn't do that because wikitude fails to play it when the file is large enough. I've already posted another question about it yesterday.
Jack Lu