1. Make buttons in Flash, which can be static buttons (such as text) or dynamic buttons (such as animation).
2. Write code in the action of the button:
on (release) {
fscommand (" Start ") // Send the command "Start"
}
on (release) {
fscommand (" End ") // Send the command "End"
}
3. Publish the created Flash as a swf animation file.
4. Put the above file in the same directory of the VB project.
5. Add Shockwave Flash component in VB.
6. Write code in VB:
Option Explicit
Private Sub Form_Load()
Flash1.Movie = (App.Path & "\ start and end.swf")
End Sub
Private Sub Flash1_fscommand(ByVal command As String, ByVal args As String)
If command = "Start" Then
'If the received command is the start
Flash2.Movie = (App.Path & "\ Animation.swf")
'Execute command
End If
If command = "End" Then
'If the received command is end
End
'Execute command
End If
End Sub