PDA

Click to See Complete Forum and Search --> : Comunication with Flash


Wolverine
Feb 18th, 2001, 06:56 PM
Hello!!!
Well I got a flash movie (.swf) in a VB form, my problem is :
I'm traying to get the value of a variable
example
The flash movie has a button and when the users press it the button set a variable with a value (for example 5)
I need to know how can I teke that value in VB.
the idea is to put a graphic button made in flash and for example when the users clicks it, a new form apears
well I hope somebody give me some help
Thanks

Danial
Feb 18th, 2001, 07:38 PM
Hi Wolverine,
To get a value from flash you need to use the FS Command. Say you have a variable called var1 then click on the "+" sign on the action tab and choose FS Command from the menu. Now you can type name of your variable (var1) next to where it says command, press ok.

To get this value in vb, place ur .swf in the form, double click on the swave component now you should get something like the following. (assuming u named ur component as myMovie1)

Private Sub myMovie1_FSCommand(ByVal command As String, ByVal args As String)
msgbox Command

select case Command
case 0
'do something
case 1
'do something else

end select
End Sub

Hope this helps