It is currently May 4th, 2024, 2:09 pm

Problem with [!Toggle]/[!Hide]/[!Show]

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Problem with [!Toggle]/[!Hide]/[!Show]

Post by jsmorley »

I don't see any problem with what you have, as it doesn't make a bit of difference what meter you put the LeftMouseUpAction on. It can be the image itself or another meter as you like. It will work exactly the same way.

You are going to want to set the counter limit to 8 and not 9 however. That way it will count from 1 to 8 and stop. If you have 9 images instead of 8, that is fine, but also change the 8 to 9 in the IfEqualAction.

Do I understand then that you don't want the animation to start when the skin is loaded or refreshed, but ONLY on the left click action? If so, just change the formula in [NumberImageCalc] to Formula=1. That way it will just display 1.png as a static image until you click the LeftMouseUpAction. Then it will start the animation and stop at image 8.

As far as just setting the transparency instead of the actual image, sure. It's time to kick you out of the nest a bit though. Take a look at using a dynamic ImageAlpha= setting instead of ImageName= and see what you can come up with.
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Problem with [!Toggle]/[!Hide]/[!Show]

Post by Mordasius »

You seem to have got some way off the original [!Toggle]/[!Hide]/[!Show] topic and jsmorley is right in suggesting that it is probably time for you to get a little push from the nest. You might like to take a look at the code for an animated slider over at this post to cushion your fall.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Problem with [!Toggle]/[!Hide]/[!Show]

Post by jsmorley »

I think it is ok for someone to highjack their own thread... ;-)
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Problem with [!Toggle]/[!Hide]/[!Show]

Post by Mordasius »

jsmorley wrote:I think it is ok for someone to highjack their own thread... ;-)
I couldn't agree more, but I was thinking of those that might search the forum and somehow miss out on your advice on animation because it was posted under a topic heading of [!Toggle]/[!Hide]/[!Show] :)
ocrax
Posts: 10
Joined: May 26th, 2012, 5:51 pm

Re: Problem with [!Toggle]/[!Hide]/[!Show]

Post by ocrax »

Thank you for all the help, I finally got my skin to work as I wanted! :thumbup:
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Problem with [!Toggle]/[!Hide]/[!Show]

Post by smurfier »

This will pause a counter

Code: Select all

[Variables]
Reset=1 ;Used to reset the counter to 0.
Max=8 ;The number at which you want the counter to stop at.
Pause=1 ;Used to pause the counter. Set to 0 to have the counter wait at 0 when the skin loads.

[SomeMeter]
Blah...
Blah...
LeftMouseUpAction=!SetVariable Reset 0 ;Resets the counter to 0.

[SomeOtherMeter]
Blah...
Blah...
LeftMouseUpAction=!SetVarible Pause (1-#Pause#) ;Toggles the Pause state of the counter.
DynamicVariables=1

[cCounter]
Measure=Calc
Formula=(cCounter+(cCounter<#Max#:#Pause#?0))*#Reset#
IfBelowValue=1
IfBelowAction=!SetVariable Reset 1
DynamicVariables=1
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .