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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FlashCommand arguments

Status
Not open for further replies.

Frihi

Programmer
Jun 24, 2001
48
CH
I know it is rather difficult, that somebody can tell me about this.

I have a form and a Flash movie running on it. The movie sends an FSCommand to the form and the form receives the command. Up to here everythings working fine. The problem is how to interpretate the parameters (Strings) which the FSCommand passes to the VB-form. The first pm should just tell where to put the message (textfield1.text) and the second is to pass the value to be inserted.

In VB6 the thing was running without problems like that:

Flash FSCommand for VB6:

on (release) {
fscommand("txtPoints", "OK");
}

Corresponding code in VB6:

Private Sub Flash1_FSCommand(ByVal command As String, ByVal args As String)

Select Case command
Case "txtPoints"
txtPoints= args
End Select

End Sub

And this worked perfectly.

Now FSCommand for VB.Net:

on (release) {
fscommand("txtPoints.Text", "OK");
}

And the Sub in VB.Net should be something like this:

Private Sub Flash1_FSCommand(ByVal sender As Object, ByVal e As AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent) Handles Flash1.FSCommand

// Here must be some declarations! But that's what I don't get to the point!

If Command = "txtPunkte.Text" Then
Select Case args
Case "txtPunkte.Text"
txtPunkte.Text = args
End Select
End If
End Sub

So nothing happens when I press the FSCommand-button in Flash.

But at the other hand, if I only put:

Private Sub Flash1_FSCommand(ByVal sender As Object, ByVal e As AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent) Handles Flash1.FSCommand

'txtPunkte.Text = "OK"

End Sub

That will work and it inserts "OK" into the Textbox.

I mean I could live with that, but I woul prefer to be able to send various types of commands. Can anybody tell me how to declare these parameters?
 
Ok, I figured it out.

Just put:

Me.myTextfield.Text = e.args

or: Me.myTextfield.Text = e.command

thats all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top