Multiple Clock faces?

Hi, I'm pretty new at creating gadgets for DesktopX and I need some help. I have created a basic analog clock. I would like to be able to have multiple clock faces and change them by a simple click on the clock. Is this possible, and if so, how or what do I do, besides have multiple clock faces ofcourse

Thanks
3,150 views 4 replies
Reply #1 Top
It's very easy.

1. You may create a several skins for your clock. For example: skin1.png, skin2.png, skin3.png etc...
2. Then you need add a "states" into clock background object which corresponding to these skins. For example: skin1, skin2, skin3 etc...
3. After that you can use a simple code like this:

Dim num, total

Sub Object_OnScriptEnter
num = 1
total = 10 '<== or any other number (this is a total amount of your skins)
End Sub

Sub Object_OnStateChange(state)
If state = "Command executed" Then
desktopx.object("My Clock").state = "skin"&num
If num < total Then num = num + 1 Else num = 1
End If
End Sub

The clock faces will be changing step by step when you click on it.

Have a nice days with DesktopX.
Reply #2 Top
Great Thanks for the response Vad_M,

Right now I have it with a right click menu, but I really would like to do it as I had planned and the way you discribed. Now lets see if I can do this
Reply #4 Top
Cool info