Hi,
Can someone please help me with pausing/stopping a gif animation. Basically I want a GIF to play while music/sound is playing and when the music or sound stops the animation must pause/stop. I have no clue how to code or how to use LUA scripting, I did try researching on google and played around with the script but can't seem to get anything right.
I'm using Muziko skin and I looked to see how the seek bar was used because it moves while music is playing and stops when the music stops, but I don't understand how to use or adapt it for the gif animation.
Any help would be greatly appreciated
It is currently September 8th, 2024, 2:58 am
Help with pausing/stopping a GIF
-
- Posts: 2
- Joined: October 19th, 2014, 3:22 pm
-
- Rainmeter Sage
- Posts: 16499
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help with pausing/stopping a GIF
A very simple solution I found is using the new AudioLevel AudioLevel plugin:
and also find the Girl.png in the attachment. Obviously, if you are using another bitmap, you'll have to modify a bit the MeterAnimation section, to work well.
Code: Select all
[Rainmeter]
Update=100
DynamicWindowSize=1
[MeasureRMSRaw]
; This measure returns the level of the main audio output.
Measure=Plugin
Plugin=AudioLevel
Port=Output
Type=RMS
[measureRMS]
Measure=Calc
Formula=( 100 * MeasureRMSRaw )
IfCondition=(measureRMS>=1)
IfTrueAction=!UnpauseMeasure MeasureAnimation
IfFalseAction=!PauseMeasure MeasureAnimation
[MeasureAnimation]
Measure=CALC
Formula=(( MeasureAnimation + 1 ) % 13 )
[MeterAnimation]
Meter=BITMAP
MeasureName=MeasureAnimation
BitmapImage=Girl.png
BitmapFrames=13
BitmapExtend=1
You do not have the required permissions to view the files attached to this post.
Last edited by balala on October 25th, 2014, 7:43 pm, edited 1 time in total.
-
- Developer
- Posts: 22716
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA