|
-
Jun 12th, 2000, 07:05 PM
#1
Thread Starter
Lively Member
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!
-
Jun 12th, 2000, 07:23 PM
#2
Lively Member
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.
-
Jun 12th, 2000, 09:12 PM
#3
Thread Starter
Lively Member
Ishamel,
You are my hero.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|