I have to text layers stacked on top of each other in the same position. I now like to do a time-based swap out but have it that ‘Text Layer 1’ is visible for 3 seconds and ‘Text Layer 2’ is only visible for 1 second - then the same loop starts again.
I found this code in the forum with 3 text layers:
first 0+(([SEC]%6==0)+([SEC]%6==1))*100
second 0+(([SEC]%6==2)+([SEC]%6==3))*100
third 0+(([SEC]%6==4)+([SEC]%6==5))*100
but these swap out at the same time intervals.
Thanks in advance - any help or tips would be much appreciated!
1 Like
[SEC]%6 is the magic but yours will be [SEC]%4 that cycles every 4 seconds . I would make a formula for the Opacity of the Colour . So the default Opacity would be Zero . In the case of the Item that is displayed for one second the formula should be.
[SEC]%4==3?100:0
I want to test the other 3 second but it could be something like .
([SEC]%4>=0)*([SEC]%4<3)?100:0
I will check it in a bit .
Greater than 0 and smaller than 3
Note % starts at 0 .
BTW Everyone does their maths differently . I understand what is happening in the formulas above but it means you have 3 layers when you only need 2 .
.
I have checked the formulas above . I had to us some () because * is AND but also Multiply . So we have to make sure the formula do one not the other .
.
1 Like
Hi @russellcresser - thank you so very much for your coding wizardry and coming up with a solution - it is so much appreciated! This works like a charm 
1 Like
Always a Pleasure to help someone who appreciates it . When I started out the watch face stuff . I said to myself I will never remember any of this ( Coding ) . But these days I can compose some simple stuff in my head . I have to keep it simple . I find at my age I do not get More Clever every day . 
1 Like
Hi Russel - let me just say your spirit and generosity of helping others in their ‘coding watch faces’ journey is an inspiration to all of us on this forum…
2 Likes
Thank you . It is pay forward for the help I got . I ride on the shoulders of Giants . We have a few great Mathematicians and we must learn to Copy and Paste . I get nowhere without trial and error . It is non destructive on these platforms .
2 Likes