Problem with triggering sound effects and image appearance/disappearance

I'm having an issue where I have a cup of coffee silently poured into cup on the main timeline. I then creatws a separate timeline called "drinking" where the user can tap on the coffee cup to trigger a sound of the coffee being drunk and the coffee disappearing. The user should then have the option to tap the coffee cup again to trigger a pour sound and the coffee refilling. The user should be able to then repeat the behavior as many times as they want. The problem is that I can't get it to work properly. The audio overlaps. Tapping the coffee the first time works causing it to be drunk, however if the user taps again it doesn't refill. Can someone help me fix this? It's a fairly simple, straightforward animation. Basically:

  1. Cup silently fills up.
  2. User taps cup=coffee sipped with sound effect.
  3. Tap cup again=coffee is refilled with sound effect.
    Like I said, this overall animation should be looped so the user can drink and refill as many times as they want.
    I uploaded the Hype file for fixing. See Google drive link:
    Any help would be much appreciated!

The issue is that your Drinking timeline, when played in reverse, animates the "coffee" hit target to a scale width and height of 0%, which means you no longer have a hit target. You will need to define another element as your click action. Either on top if you always want it to be the same, or below if you want it to be different.

It sounds like I would have to duplicate the coffee asset to produce the effect, which would take up more memory. Is there an alternative to making this animation without having to add an extra asset?

1 Like

There's really no way around making a 0x0 px click target clickable (without manual code gymnastics, at least). The amount of memory for an element to handle your clicks without visual contents is negligible. If you're really concerned then you may want to look at your structure and see if there's another element that you can use as your click target that does not shrink down to nothing.