Sub Release_Logo
'For Image_Count = 1 To 100
Random_Pos = Rnd(1,5)
If Random_Pos = Random_Pos_Last Then
Random_Pos = Rnd(1,5)
End If
Random_Pos_Last = Random_Pos
Select Random_Pos
Case 1
X_Pos = Image_Left_Post
Case 2
X_Pos = Image_Left_Post + Logo_Space
Case 3
X_Pos = Image_Left_Post + Logo_Space + Logo_Space
Case 4
X_Pos = Image_Left_Post + Logo_Space + Logo_Space + Logo_Space
End Select
Random_Image = Rnd(1,5)
If Random_Image = Random_Image_Last Then
Random_Image = Rnd(1,5)
End If
Random_Image_Last = Random_Image
Select Random_Image
Case 1
im.Initialize("C:/Smash","pepsi.png") ' your image file
Case 2
im.Initialize("C:/Smash","youtube.png") ' your image file
Case 3
im.Initialize("C:/Smash","coke.png") ' your image file
Case 4
im.Initialize("C:/Smash","ups.png") ' your image file
End Select
Select Image_count
Case 1
iv1.Initialize("iv1")
iv1.SetImage(im)
MainForm.RootPane.AddNode(iv1,X_Pos,Image_Start_Point,Image_Size,Image_Size)
Dim jo As JavaObject = iv1 ' the imageview
Dim o As Object = jo.CreateEvent("javafx.beans.value.ChangeListener","moved",False)
jo.runmethodJO("layoutYProperty",Null).RunMethod("addListener",Array(o)) ' make sure you choose property that will change
iv1.SetLayoutAnimated(Image_Speed,X_Pos,Image_Bottom_End,Image_Size,Image_Size) ' left/right up/down
Case 2
iv2.Initialize("iv2")
iv2.SetImage(im)
MainForm.RootPane.AddNode(iv2,X_Pos,Image_Start_Point,Image_Size,Image_Size)
Dim jo As JavaObject = iv2 ' the imageview
Dim o As Object = jo.CreateEvent("javafx.beans.value.ChangeListener","moved",False)
jo.runmethodJO("layoutYProperty",Null).RunMethod("addListener",Array(o)) ' make sure you choose property that will change
iv2.SetLayoutAnimated(Image_Speed,X_Pos,Image_Bottom_End,Image_Size,Image_Size) ' left/right up/down
Case 3
iv3.Initialize("iv3")
iv3.SetImage(im)
MainForm.RootPane.AddNode(iv3,X_Pos,Image_Start_Point,Image_Size,Image_Size)
Dim jo As JavaObject = iv3 ' the imageview
Dim o As Object = jo.CreateEvent("javafx.beans.value.ChangeListener","moved",False)
jo.runmethodJO("layoutYProperty",Null).RunMethod("addListener",Array(o)) ' make sure you choose property that will change
iv3.SetLayoutAnimated(Image_Speed,X_Pos,Image_Bottom_End,Image_Size,Image_Size) ' left/right up/down
Case 4
iv4.Initialize("iv4")
iv4.SetImage(im)
MainForm.RootPane.AddNode(iv4,X_Pos,Image_Start_Point,Image_Size,Image_Size)
Dim jo As JavaObject = iv4 ' the imageview
Dim o As Object = jo.CreateEvent("javafx.beans.value.ChangeListener","moved",False)
jo.runmethodJO("layoutYProperty",Null).RunMethod("addListener",Array(o)) ' make sure you choose property that will change
iv4.SetLayoutAnimated(Image_Speed,X_Pos,Image_Bottom_End,Image_Size,Image_Size) ' left/right up/down
Case 5
iv5.Initialize("iv5")
iv5.SetImage(im)
MainForm.RootPane.AddNode(iv5,X_Pos,Image_Start_Point,Image_Size,Image_Size)
Dim jo As JavaObject = iv5 ' the imageview
Dim o As Object = jo.CreateEvent("javafx.beans.value.ChangeListener","moved",False)
jo.runmethodJO("layoutYProperty",Null).RunMethod("addListener",Array(o)) ' make sure you choose property that will change
iv5.SetLayoutAnimated(Image_Speed,X_Pos,Image_Bottom_End,Image_Size,Image_Size) ' left/right up/down
Case 6
iv6.Initialize("iv6")
iv6.SetImage(im)
MainForm.RootPane.AddNode(iv6,X_Pos,Image_Start_Point,Image_Size,Image_Size)
Dim jo As JavaObject = iv6 ' the imageview
Dim o As Object = jo.CreateEvent("javafx.beans.value.ChangeListener","moved",False)
jo.runmethodJO("layoutYProperty",Null).RunMethod("addListener",Array(o)) ' make sure you choose property that will change
iv6.SetLayoutAnimated(Image_Speed,X_Pos,Image_Bottom_End,Image_Size,Image_Size) ' left/right up/down
Case 7
iv7.Initialize("iv7")
iv7.SetImage(im)
MainForm.RootPane.AddNode(iv7,X_Pos,Image_Start_Point,Image_Size,Image_Size)
Dim jo As JavaObject = iv7 ' the imageview
Dim o As Object = jo.CreateEvent("javafx.beans.value.ChangeListener","moved",False)
jo.runmethodJO("layoutYProperty",Null).RunMethod("addListener",Array(o)) ' make sure you choose property that will change
iv7.SetLayoutAnimated(Image_Speed,X_Pos,Image_Bottom_End,Image_Size,Image_Size) ' left/right up/down
Case 8
iv8.Initialize("iv8")
iv8.SetImage(im)
MainForm.RootPane.AddNode(iv8,X_Pos,Image_Start_Point,Image_Size,Image_Size)
Dim jo As JavaObject = iv8 ' the imageview
Dim o As Object = jo.CreateEvent("javafx.beans.value.ChangeListener","moved",False)
jo.runmethodJO("layoutYProperty",Null).RunMethod("addListener",Array(o)) ' make sure you choose property that will change
iv8.SetLayoutAnimated(Image_Speed,X_Pos,Image_Bottom_End,Image_Size,Image_Size) ' left/right up/down
Case 9
iv9.Initialize("iv9")
iv9.SetImage(im)
MainForm.RootPane.AddNode(iv9,X_Pos,Image_Start_Point,Image_Size,Image_Size)
Dim jo As JavaObject = iv9 ' the imageview
Dim o As Object = jo.CreateEvent("javafx.beans.value.ChangeListener","moved",False)
jo.runmethodJO("layoutYProperty",Null).RunMethod("addListener",Array(o)) ' make sure you choose property that will change
iv9.SetLayoutAnimated(Image_Speed,X_Pos,Image_Bottom_End,Image_Size,Image_Size) ' left/right up/down
Case 10
iv10.Initialize("iv10")
iv10.SetImage(im)
MainForm.RootPane.AddNode(iv10,X_Pos,Image_Start_Point,Image_Size,Image_Size)
Dim jo As JavaObject = iv10 ' the imageview
Dim o As Object = jo.CreateEvent("javafx.beans.value.ChangeListener","moved",False)
jo.runmethodJO("layoutYProperty",Null).RunMethod("addListener",Array(o)) ' make sure you choose property that will change
iv10.SetLayoutAnimated(Image_Speed,X_Pos,Image_Bottom_End,Image_Size,Image_Size) ' left/right up/down
End Select
Image_count = Image_count + 1
If Image_count = 11 Then
Image_count = 1
End If
End Sub