-
Hi,
I'm embedding a Flash movie in my VB app. There are 4 buttons in my Flash movie. Each button in the movie, when clicked, should load a different form of my VB app.
Does anybody know why this VB code doesn't work? Only the button with args ="1" works, and nothing else.
Private Sub ShockwaveFlash1_FSCommand(ByVal command As String, ByVal args As String)
If args = "1" Then
form2.show
If args = "2" Then
form3.show
If args = "3" Then
form4.show
If args = "4" Then
form5.show
End If
End If
End If
End If
End Sub
Thanks for any help!
-
The first If statement is checking for arg = "1". If arg is not "1" then your code is jumping to the last End If statement. (There is no Else clause in your code, so your program has no instructions if arg is not "1".)
I think it would probably be better if you used a Select Case statement anyway.
Code:
Private Sub ShockwaveFlash1_FSCommand(ByVal command As String, ByVal args As String)
Select Case args
Case "1"
form2.Show
Case "2"
form3.Show
Case "3"
form4.Show
Case "4"
form5.Show
End Select
End Sub
Hope this helps.
-
Ishamel,
You are my hero.