Several clock or not?


#1

Hi !
I searched for 2 days i can’t find issue to my problem , thank you for your help

I have 6 label ( l1 l2 l3 and f1 f2 f3) . L1 l2 l3 are visible and f1 f2 f3 are hidden. I want that when i tap on l1 so f1 appears for 2 seconds then disappear, l2 makes f2 appear for 2 seconds too, and l3 for f3.
I made a clock and i call the clock but when i test it on companion it works only for l1/f1 then i click on l2 it doesn’t work.
Do i have to create 3 clocks ??
I will have lots of couple (l/f) so lots of clocks ??
Please help me :blush:
Have nice day


#2

Maybe explain what you want to show in the labels.


#3

I have a sentence :

" my red cat"

When i click on "my " i want the word “mon” appears just down “my” then desappear after 2 s
When i click on “red” appears “rouge” down
When i click on “cat” appears “chat”

So i made 3 VA :
“My “red “cat
Mon” rouge” chat”


#4

Maybe also show your blocks?


#5


#6


This is what i tried first but it just works for a1/f1


#7

ok sorry i added just a
set clock1 timer interval to 2000 ms
and it works now…

I don’t know how i forgot it :hushed:
2 days lost :cry:


#8

Great that it is working. Sorry for the two days lost. I guess you could just use one clock and make a procedure for the set visible to false blocks. You use them in more then one place so a procedure can be made here.


#9

I used a little trick once to use only one clock for everything. This trick is good only if you don’t need exact milisecond intervals.
I set the TimerInterval to 1000 for one procedure, 1001 to another, 1002, 1003 etc. The difference is not noticeable by a normal human :grin: and inside the Timer event you have to use an IF to ask what value the TimerInterval has and that’s it.
But again, this is useful only if you don’t need exact time, like in a chronometer.


#10

That is a great trick.


#12

When L1 click, set F1.visible = True & clock.enabled = True

Do same that in L2 and L3

(You can also make procedure for do that)

Set clock.interval = 2000
At Timer, set F1,F2 and F3 .visible = False