It is currently September 29th, 2024, 7:24 pm

Single looping animation

General topics related to Rainmeter.
User avatar
Fuzzybat23
Posts: 44
Joined: May 10th, 2013, 1:21 am

Single looping animation

Post by Fuzzybat23 »

So.. I have making an animation down pretty well.

Code: Select all

[AniCalc]
Measure=Calc
Formula=Counter % (However many frames)
Substitute=".00000":""

[Animation]
Meter=Image
ImageName=[AniCalc].png
Path="Where it's at"
DynamicVariables=1
What I'm trying to do now is:
* Display the first frame
* Have it be clickable with the mouse
* Animate to the last frame and stop

I've tried this, but all it does is display the first frame, count from 0 to max frame, then displays the last frame. Any pointers?

Code: Select all


[Variables]
Max_Frame=20
Current_Frame=0

[Open_Bar]
	Measure=Calc
	Formula=(Open_Bar + 1)
	IfEqualValue=#Max_Frame#
	IfEqualAction=[!setVariable Current_Frame #Max_Frame#][!DisableMeasure Open_Bar]
	IfBelowValue=-#Max_Frame#    
	IfBelowAction=[!setVariable Current_Frame [Open_Bar]]  (This part doesn't seem to be setting the 
                                                           variable to Open_Bar's incremental value at all)
	Disabled=1

[Closed]
Meter=Image
ImageName=Graphics/Bar#Current_Frame#.png
x=0
y=0
DynamicVariables=1
LeftMouseUpAction=[!EnableMeasure Open_Bar]


[Test]
Meter=String
MeasureName=Open_Bar
x=55
y=75
FontColor=Red
Text="%1, #Current_Frame#"
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Single looping animation

Post by Seahorse »

Try using a counter to control it? Animation guide, Counters.
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
Fuzzybat23
Posts: 44
Joined: May 10th, 2013, 1:21 am

Re: Single looping animation

Post by Fuzzybat23 »

No dice. Using:

Code: Select all

[Blah]
Measure=Calc
Formula=Counter%21 (20 Frames)
IfEqualValue=21
IfEqualAction=Do Something
Does the exact same thing as

Code: Select all

[Blah2]
Measure=Calc
Formula=Blah2 + 1
IfEqualValue=20 (Still 20 Frames)
IfEqualAction=Do Something
User avatar
Fuzzybat23
Posts: 44
Joined: May 10th, 2013, 1:21 am

Re: Single looping animation

Post by Fuzzybat23 »

Fixed it!

Code: Select all

[Open_Bar]
	Measure=Calc
	Formula=(Open_Bar + 1)
	IfEqualValue=#Max_Frames#
	IfEqualAction=[!DisableMeasure Open_Bar][!HideMeter Opening][!ShowMeter Close]
	Disabled=1

[Open]
Meter=Image
ImageName=Graphics/Bar#Min_Frames#.png
x=0
y=0
DynamicVariables=1
LeftMouseUpAction=[!EnableMeasure Open_Bar][!HideMeter Open][!ShowMeter Opening]

[Opening]
Meter=Image
ImageName=Graphics/Bar[Open_Bar].png
x=0
y=0
DynamicVariables=1
Hidden=1

[Close]
Meter=Image
ImageName=Graphics/Bar#Max_Frames#.png
x=0
y=0
DyamicVariables=1
Hidden=1
Added two more meters. The first displays the image at 0 frame. The second activates and displays the animation until the Open_Bar reaches the max frame count, then it displays the third meter which is set to the max frame.
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Single looping animation

Post by Seahorse »

Good news, I look forward to seeing the finished skin ;-)
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
Fuzzybat23
Posts: 44
Joined: May 10th, 2013, 1:21 am

Re: Single looping animation

Post by Fuzzybat23 »

It's far from finished, but here's the animation so far.

http://fuzzybat23.deviantart.com/art/Rainmeter-Prototype-App-Launcher-372624876

Have to link to my deviantart page since the forum doesn't allow mp4 or swf uploads.
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Single looping animation

Post by Seahorse »

Shiny 8-)
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt