Askjerry
New member
Just getting started in VB .NET and was making good progress. Got a real head scratcher here.
Made a simple form with the following items...
Shockwave Flash (flash_movie)
Button (Button1)
Label (Label1)
The FLASH movie consists of a single text item (mytext) which I want to change the value of. Currently it has the text "DEFAULT" in it... and I want to click the button and have it say "Hello". If I can get that far... I should be able to do something more complex.
Here is the current VB code... the remarked items all failed... no errors... they just didn't work at all.
I created another FLASH movie which was exactly the same except that I created a rectangle, and from within FLASH told it that if clicked to change the text value of "mytext" to "Hello"... it worked flawlessly. So I know the variable is definitely _root.mytext it's just that I can't seem to get to it from VB.NET
Here is the file if you want to download it and try it yourself: http://askjerry.info/files/DSP.swf
I know it's something simple I'm missing... please help!
Thanks,
Jerry
Made a simple form with the following items...
Shockwave Flash (flash_movie)
Button (Button1)
Label (Label1)
The FLASH movie consists of a single text item (mytext) which I want to change the value of. Currently it has the text "DEFAULT" in it... and I want to click the button and have it say "Hello". If I can get that far... I should be able to do something more complex.
Here is the current VB code... the remarked items all failed... no errors... they just didn't work at all.
VB.NET:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
flash_movie.Movie = Application.StartupPath() + "\DSP.swf"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Text = "Button Clicked"
'flash_movie.SetVariable("_root.mytext", "Hello")
'flash_movie.SetVariable("mytext", "Hello")
'flash_movie.FlashVars = "_root.mytext=hello"
'flash_movie.FlashVars = ("_root.mytext=hello")
End Sub
End Class
I created another FLASH movie which was exactly the same except that I created a rectangle, and from within FLASH told it that if clicked to change the text value of "mytext" to "Hello"... it worked flawlessly. So I know the variable is definitely _root.mytext it's just that I can't seem to get to it from VB.NET
Here is the file if you want to download it and try it yourself: http://askjerry.info/files/DSP.swf
I know it's something simple I'm missing... please help!
Thanks,
Jerry