08-03-2020 08:30
08-03-2020 08:30
I have this and it works fine but I want the animation only start when a user touches the screen. I try changing the begin="enable" to begin="click" or "mousedown" but it does not seemed to work. Is there something else I need to change to make it start only when user touches the screen ?
<symbol id="bgframes" href="#sprite-image">
<animate id="anim" attributeName="value" begin="enable"
from="1" to="15" dur="4"
repeatDur="30" repeatCount="indefinite" />
<image href="bg_01.png" />
</symbol>
11-24-2021 19:20
11-24-2021 19:20
Having the same issue and can't find the solution. Was hoping someone would have given the answer...
11-24-2021 19:34
11-24-2021 19:34
If nothing else works, you could call .animate() from your .js. You'll also need to set up the plumbing to detect the touch/click/mouse event.
11-24-2021 19:56
11-24-2021 19:56
How would I set it up to detect touch/click/mouse event? Graphics I'm awesome at coding, not at all. I'm learning this on the fly.
my index.j
import * as document from "document";
const dobbyAnimation = document.getElementById("dobbyAnimation");
dobbyAnimation.animate("click");
widgets.gui
<symbol id="frames" href="#sprite-image">
<animate id="anim" attributeName="value" begin="click"
from="01" to="40" dur="2.5" />
<image href="dobby_01.png" width="300" height="300" />
</symbol>
It does nothing. If I switch click to enable and add repeat duration/count it works and plays perfectly. I would rather it play on click.
Idealistically I would like 3 different animations that it cycles through on click but one step at a time... I'm trying to make my own version of the toystory apple watch face but with harry potter...
11-24-2021 20:04
11-24-2021 20:04
https://dev.fitbit.com/build/guides/user-interface/javascript/#events
11-24-2021 20:32
11-24-2021 20:32
THANK YOU! Took me forever where to put the pointer-events="visible" because I don't have a .view file but I got it!! In my index.gui, Thanks for pointing me in the right direction!! I've been working hours on this one tiny thing!!!
11-24-2021 20:40
11-24-2021 20:40
Fabulous; well done! pointer-events is a common gotcha, and the old documentation doesn't help.
The satisfaction of overcoming hurdles like this makes the pain worthwhile — sometimes.
I was half-expecting criticism for being vague. 🙂