Slowly but surely.....
I am having some trouble understanding this code,
why is Duration = SlidingDuration? i cannot see where it is used anywhere
these statements also confuse me
Dim a(2) As Animation
sd.leftAnimations = a
Dim a(2) As Animation
sd.rightAnimations = a
i would have thought they would be like this in other langs
Dim a(2) As Animation
sd.leftAnimations = a(1)
sd.rightAnimations = a(2)
s there somewhere that could explan them?
thanks
Joe
i
Sub Initialize (sd As SlidingData, SlidingDuration As Int)
Duration = SlidingDuration
Main.tmrAnimation.Initialize("tmrAnimation", 2)
Dim a(2) As Animation
sd.leftAnimations = a
Dim a(2) As Animation
sd.rightAnimations = a
'Initialize the animation objects. We need two objects for each direction as both the current panel and the new panel are animated.
For i = 0 To 1
sd.leftAnimations(i).InitializeTranslate("animation" & i, 0, 0, -100%x, 0)
sd.leftAnimations(i).Duration = SlidingDuration
sd.rightAnimations(i).InitializeTranslate("animation" & i, 0, 0, 100%x, 0)
sd.rightAnimations(i).Duration = SlidingDuration
Next
For i = 0 To sd.panels.Length - 1
sd.Panels(i).Left = 100%x 'Move the panels right of the screen
Next
sd.currentPanel = -1
End Sub
I am having some trouble understanding this code,
why is Duration = SlidingDuration? i cannot see where it is used anywhere
these statements also confuse me
Dim a(2) As Animation
sd.leftAnimations = a
Dim a(2) As Animation
sd.rightAnimations = a
i would have thought they would be like this in other langs
Dim a(2) As Animation
sd.leftAnimations = a(1)
sd.rightAnimations = a(2)
s there somewhere that could explan them?
thanks
Joe
i
Sub Initialize (sd As SlidingData, SlidingDuration As Int)
Duration = SlidingDuration
Main.tmrAnimation.Initialize("tmrAnimation", 2)
Dim a(2) As Animation
sd.leftAnimations = a
Dim a(2) As Animation
sd.rightAnimations = a
'Initialize the animation objects. We need two objects for each direction as both the current panel and the new panel are animated.
For i = 0 To 1
sd.leftAnimations(i).InitializeTranslate("animation" & i, 0, 0, -100%x, 0)
sd.leftAnimations(i).Duration = SlidingDuration
sd.rightAnimations(i).InitializeTranslate("animation" & i, 0, 0, 100%x, 0)
sd.rightAnimations(i).Duration = SlidingDuration
Next
For i = 0 To sd.panels.Length - 1
sd.Panels(i).Left = 100%x 'Move the panels right of the screen
Next
sd.currentPanel = -1
End Sub