#Region Project Attributes
#MainFormWidth: 1920
#MainFormHeight: 1080
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private Aantal As Int
Private m As MediaPlayer
Private mv As JavaObject
Private fire As MediaPlayer
Private firev As JavaObject
Private Image0 As Image
Private Image1 As Image
Private Image2 As Image
Private Image3 As Image
Private Image4 As Image
Private Image5 As Image
Private Image6 As Image
Private Image7 As Image
Private Image8 As Image
Private Image9 As Image
Private EuroImage As Image
Private Nummer1 As ImageView
Private Nummer2 As ImageView
Private Nummer3 As ImageView
Private Nummer4 As ImageView
Private Nummer5 As ImageView
Private mapOfViews As Map
Private Euro As ImageView
Private money As AudioClip
End Sub
Sub AppStart (Form1 As Form, Args() As String)
Dim Getal5 As Int
MainForm = Form1
MainForm.RootPane.LoadLayout("Main")
money.Initialize(File.GetUri("","Cha_Ching_Register-Muska666-173262285.wav"))
Image0.Initialize("","0.png")
Image1.Initialize("","1.png")
Image2.Initialize("","2.png")
Image3.Initialize("","3.png")
Image4.Initialize("","4.png")
Image5.Initialize("","5.png")
Image6.Initialize("","6.png")
Image7.Initialize("","7.png")
Image8.Initialize("","8.png")
Image9.Initialize("","9.png")
EuroImage.Initialize("","euro-symbol2.png")
mapOfViews.Initialize
mapOfViews.Put("Im0", Image0)
mapOfViews.Put("Im1", Image1)
mapOfViews.Put("Im2", Image2)
mapOfViews.Put("Im3", Image3)
mapOfViews.Put("Im4", Image4)
mapOfViews.Put("Im5", Image5)
mapOfViews.Put("Im6", Image6)
mapOfViews.Put("Im7", Image7)
mapOfViews.Put("Im8", Image8)
mapOfViews.Put("Im9", Image9)
mapOfViews.Put("EuroImage",EuroImage)
Aantal = 1
Getal5 = 1
Dim GetalPNG5 As Image = mapOfViews.Get("Im"&Getal5)
Dim GetalPNG4 As Image = mapOfViews.Get("EuroImage")
Nummer4.SetImage(GetalPNG4)
Nummer5.SetImage(GetalPNG5)
fire.Initialize("m",File.GetUri("","fire.mp4"))
firev.InitializeNewInstance("javafx.scene.media.MediaView",Array(fire))
MainForm.RootPane.AddNode(firev,0,0,1000,1000)
firev.RunMethod("toBack",Null)
fire.CycleCount = -1
fire.Play
Dim jfs As JavaObject = MainForm
Dim stage As JavaObject = jfs.GetField("stage")
stage.RunMethod("setFullScreen", Array As Object(True))
MainForm.Show
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub MainForm_MouseClicked (EventData As MouseEvent)
Dim AantalStr As String
Dim lengte As Int
Dim i, x As Int
Dim getal1, getal2, getal3, getal4, getal5, groepbreedte, links As Int
Dim FadeOut As ImageView
FadeOut.Initialize("")
FadeOut.SetImage(Nummer5.GetImage)
Aantal = Aantal + 1
AantalStr = Aantal
lengte = AantalStr.Length
x = 5-lengte
For i = 1 To x
AantalStr = "0" & AantalStr
Next
getal1 = AantalStr.SubString2(0,1)
getal2 = AantalStr.SubString2(1,2)
getal3 = AantalStr.SubString2(2,3)
getal4 = AantalStr.SubString2(3,4)
getal5 = AantalStr.SubString2(4,5)
Dim GetalPNG1 As Image = mapOfViews.Get("Im"&getal1)
Dim GetalPNG2 As Image = mapOfViews.Get("Im"&getal2)
Dim GetalPNG3 As Image = mapOfViews.Get("Im"&getal3)
Dim GetalPNG4 As Image = mapOfViews.Get("Im"&getal4)
Dim GetalPNG5 As Image = mapOfViews.Get("Im"&getal5)
Select lengte
Case 1
groepbreedte = 475
links = MainForm.WindowWidth/2
links = links - (475/2)
Nummer4.Left = links
Nummer5.Left = links + 230 + 10
Euro.Visible = False
Nummer3.Visible = False
Nummer2.Visible = False
Nummer1.Visible = False
Nummer4.Visible = True
Nummer5.Visible = True
Nummer4.SetImage(EuroImage)
Nummer5.SetImage(GetalPNG5)
Case 2
groepbreedte = 230 +10 + 230 + 10 + 230
links = MainForm.WindowWidth/2
links = links - (groepbreedte/2)
Nummer3.Left = links
Nummer4.Left = links + 230 + 10
Nummer5.Left = links + 230 + 10 + 230 + 10
Euro.Visible = False
Nummer1.Visible = False
Nummer2.Visible = False
Nummer3.Visible = True
Nummer4.Visible = True
Nummer5.Visible = True
Nummer3.SetImage(EuroImage)
Nummer4.SetImage(GetalPNG4)
Nummer5.SetImage(GetalPNG5)
Case 3
groepbreedte = 230 +10 + 230 + 10 + 230 + 10 + 230
links = MainForm.WindowWidth/2
links = links - (groepbreedte/2)
Nummer2.Left = links
Nummer3.Left = links + 230 + 10
Nummer4.Left = links + 230 + 10 + 230 + 10
Nummer5.Left = links + 230 + 10 + 230 + 10 + 230 + 10
Euro.Visible = False
Nummer1.Visible = False
Nummer2.Visible = True
Nummer3.Visible = True
Nummer4.Visible = True
Nummer5.Visible = True
Nummer2.SetImage(EuroImage)
Nummer3.SetImage(GetalPNG3)
Nummer4.SetImage(GetalPNG4)
Nummer5.SetImage(GetalPNG5)
Case 4
groepbreedte = 230 +10 + 230 + 10 + 230 + 10 + 230 + 230 + 10
links = MainForm.WindowWidth/2
links = links - (groepbreedte/2)
Nummer1.Left = links
Nummer2.Left = links + 230 + 10
Nummer3.Left = links + 230 + 10 + 230 + 10
Nummer4.Left = links + 230 + 10 + 230 + 10 + 230 + 10
Nummer5.Left = links + 230 + 10 + 230 + 10 + 230 + 10 + 230 + 10
Euro.Visible = False
Nummer1.Visible = True
Nummer2.Visible = True
Nummer3.Visible = True
Nummer4.Visible = True
Nummer5.Visible = True
Nummer1.SetImage(EuroImage)
Nummer2.SetImage(GetalPNG2)
Nummer3.SetImage(GetalPNG3)
Nummer4.SetImage(GetalPNG4)
Nummer5.SetImage(GetalPNG5)
Case 5
groepbreedte = 230 +10 + 230 + 10 + 230 + 10 + 230 + 230 + 10 + 230 + 10
links = MainForm.WindowWidth/2
links = links - (groepbreedte/2)
Euro.Left = links
Nummer1.Left = links + 230 + 10
Nummer2.Left = links + 230 + 10 + 230 + 10
Nummer3.Left = links + 230 + 10 + 230 + 10 + 230 + 10
Nummer4.Left = links + 230 + 10 + 230 + 10 + 230 + 10 + 230 + 10
Nummer5.Left = links + 230 + 10 + 230 + 10 + 230 + 10 + 230 + 10 + 230 + 10
Euro.Visible = True
Nummer1.Visible = True
Nummer2.Visible = True
Nummer3.Visible = True
Nummer4.Visible = True
Nummer5.Visible = True
Euro.SetImage(EuroImage)
Nummer1.SetImage(GetalPNG1)
Nummer2.SetImage(GetalPNG2)
Nummer3.SetImage(GetalPNG3)
Nummer4.SetImage(GetalPNG4)
Nummer5.SetImage(GetalPNG5)
End Select
money.Play
Dim MediaViewNode As Node = firev
MediaViewNode.RemoveNodeFromParent
If Aantal = 10 Then
m.Initialize("m",File.GetUri("","effect6.mp4"))
mv.InitializeNewInstance("javafx.scene.media.MediaView",Array(m))
MainForm.RootPane.AddNode(mv,0,0,1000,1000)
mv.RunMethod("toBack",Null)
m.Stop
m.Play
Else
m.Initialize("m",File.GetUri("","effect5.mp4"))
mv.InitializeNewInstance("javafx.scene.media.MediaView",Array(m))
MainForm.RootPane.AddNode(mv,0,0,1000,1000)
mv.RunMethod("toBack",Null)
m.Stop
m.Play
End If
Dim l As Int = Nummer5.Left
Dim top As Int = 0 - Nummer5.Height
Dim w As Int = Nummer5.Width / 2
Dim h As Int = Nummer5.Height / 2
FadeOut.Visible = False
MainForm.RootPane.AddNode(FadeOut, Nummer5.Left, Nummer5.Top - 100, Nummer5.Width, Nummer5.Height)
Nummer5.Visible = False
FadeOut.Visible = True
FadeOut.SetLayoutAnimated(500,l-100,top,w,h)
Sleep(400)
Nummer5.Visible = True
End Sub
Sub m_complete()
Dim MediaViewNode As Node = mv
MediaViewNode.RemoveNodeFromParent
fire.Initialize("m",File.GetUri("","fire.mp4"))
firev.InitializeNewInstance("javafx.scene.media.MediaView",Array(fire))
MainForm.RootPane.AddNode(firev,0,0,1000,1000)
firev.RunMethod("toBack",Null)
fire.CycleCount = -1
fire.Play
End Sub