Play short animation when clicking and holding on an event?

This is a bit of a stretch. But I was hoping someone could help me with this.

I'm looking for a way to play a short animation when clicking and holding on part of an image, which I'm assuming I would just make an event. It doesn't have to repeat the animation, just get to the last frame of the animation. And on release, it just undoes the animation. Also hoping that it checks for length of time held, and adds it to a specific variable.
Is that animation part of an GUI, part of a map object, or independent pictures overlayed?
Is that animation part of an GUI, part of a map object, or independent pictures overlayed?
I could do either part of a map object or independent pictures overlayed. I'm not 100% certain how I want it yet, but preferably independent pictures overlayed.
That is not why I asked.

all three variants can be done, but need to be done in different ways.

YOU need to decide which way to go, before anyone can tell you how to do that.
And for that we need to know what the specific animation is supposed to do as well - is it a chest opening, or a GUI element displaying a help-tip or whatever?
That is not why I asked.

all three variants can be done, but need to be done in different ways.

YOU need to decide which way to go, before anyone can tell you how to do that.
And for that we need to know what the specific animation is supposed to do as well - is it a chest opening, or a GUI element displaying a help-tip or whatever?
In that case, it's something for a puzzle in a point and click. I wanted it so that if a player clicks on a gear, it rotates it to some extent, and then when the player lets go it undoes it. I'd want something like, an animation over a still or maybe another animation. Hoping for maybe more than one potential thing to click on, at a time.
For a puzzle like that you should search for a plugin that calls a common event when clicking on a picture - there are two or three like that iirc, for example from yanfly.

then you use show picture to show the gears, and link each picture to a different common event that does the animation on the picture with the different show picture and move picture commands.

It might be a bit tricky to get the reverse on release, but that is still the way to go as map elements are too small to make the gearturning reasonable visible.
For a puzzle like that you should search for a plugin that calls a common event when clicking on a picture - there are two or three like that iirc, for example from yanfly.

then you use show picture to show the gears, and link each picture to a different common event that does the animation on the picture with the different show picture and move picture commands.

It might be a bit tricky to get the reverse on release, but that is still the way to go as map elements are too small to make the gearturning reasonable visible.
Thank you! I might come back here again for your help when I get the right images to test this with.

Original thread: https://forums.rpgmakerweb.com/threads/play-short-animation-when-clicking-and-holding-on-an-event.158516/