AddCircles() ' show loading circles
For st = 1 To 5 ' load picures
image = ImageList.LoadImage(url[st])
img[st] = Shapes.AddImage(image)
Shapes.Move(img[st],100,10)
Shapes.SetOpacity(img[st], 0)
EndFor
GraphicsWindow.BrushColor = "DarkBlue"
txt = Shapes.AddText(" Photo by Yvan Leduc 2016")
Shapes.SetOpacity(txt, 0)
Shapes.Move(txt, 800, 650)
Timer.Pause()
Program.Delay(100)
RemoveCircles()
For times = 1 To 2
For st =1 To 5 ' st for slide time to show 3 seconds
For op = 0 To 100
Shapes.SetOpacity(img[st], op)
Shapes.SetOpacity(txt, op)
Program.Delay(10)
EndFor
Program.Delay(3000)
For op = 100 To 0 Step -1
Shapes.SetOpacity(txt, op)
Shapes.SetOpacity(img[st], op)
Program.Delay(10)
EndFor
EndFor
EndFor
GraphicsWindow.FontSize = 100
GraphicsWindow.DrawBoundText(600, 300, 500, " The End")
Sub AddCircles
xo = gw / 2
yo = gh / 2
i = 0
GraphicsWindow.BrushColor = "White"
GraphicsWindow.PenWidth = 0
For θ = 0 To 340 Step 20
i = i + 1
ell[i] = Shapes.AddEllipse(16, 16)
x = xo + 60 * Math.Sin(Math.GetRadians(θ))
y = yo - 60 * Math.Cos(Math.GetRadians(θ))
Shapes.Move(ell[i], x - 8, y - 8)
Shapes.SetOpacity(ell[i], 10)
EndFor
i = 1
n = Array.GetItemCount(ell)
Timer.Interval = 100
Timer.Tick = OnTick
EndSub
Sub RemoveCircles
For i = 1 To n
Shapes.Remove(ell[i])
EndFor
EndSub
Sub OnTick
Stack.PushValue("local", i)
i = i + 4
If n < i Then
i = Math.Remainder(i, n)
EndIf
For op = 50 To 10 Step -10
Shapes.SetOpacity(ell[i], op)
i = i - 1
If i < 1 Then
i = n
EndIf
EndFor
i = Stack.PopValue("local")
i = i + 1
If n < i Then
i = 1
EndIf
EndSub