Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a VB function from Flash? 2

Status
Not open for further replies.

level0

Programmer
Dec 6, 2001
22
GB
Does anybody know how to (if possible) communicate between flash to Visual Basic?

E.g If we have a Flash movie(object) embeded on a VB form, is it possible to open a new VB form directly from flash?

Or is it possible to send variables from flash to VB?

Please if anybody knows give me a tip.

Thanks
 



Regards,

oldman3.gif
 
To send commands from Flash to VB:

fscommand("command","args") // command + args are Strings

So to catch them in VB.Net:
Private Sub Flash1_FSCommand(ByVal sender As Object, ByVal e As AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent) Handles Flash1.FSCommand

If e.command = "something" Then
myTextbox.Text = e.args
End Sub

and in VB6:
Private Sub Flash1_FSCommand(ByVal command As String, ByVal args As String)

Select Case command
Case "Something"
dostuff = args
End Select
End Sub

You can do almost everything with that.

Now to catch variables from VB in Flash I don't know yet, but it must be possible also. Something like:

Flash1.GotoFrame(frameNum as Integer)

Are you working with VB6 or .Net?
 
Thanks for your responses and sorry for the delay to answer, it was an excellent feedback.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top