This is an archived tutorial from the kirupa.com legacy collection. It covers software that may no longer be available, but it is kept online because the ideas still hold up.
One of the things that Flash is good for is making great user interfaces, which is a feature most other programming languages lack. I’ve discovered a way to make a user-friendly interface in Flash, and then use that interface inside a Visual Basic Application.
For an example of what you will be creating, download the following file, unzip it, and run the vbSample.exe program:
[ extract and open the file vbFlash.exe ]
The following steps will guide you in creating the files you opened above:
Start Flash MX, and make a new
movie with any dimensions you would like. I used
the dimensions 200px by 150px.
Next, make a new Button Symbol, and name it anything you want:

[ create a new button symbol ]
Make a rectangle in the first
frame of the button, about 10 X 50 pixels, any
color other than your background color. Align it
to the center of the scene.
Make a Key Frame in the next 2 frames of the button, and change the colors of the button for each frame:

[ modify the button for the up, over, and down states]
Make a new layer, and put the word
“Click” in that layer.
Now, go back to the Scene 1, and
drag an instance of the Button onto the scene.
Drag a Text Field from the toolbox onto the scene, and give it the Dynamic Text property:

[ the text field and button ]
Set the Instance Name to: “testField” and the var to: “testVar”.

[
the properties text field ]
Click on the Button on the Scene,
and open the “Actions” box.
Type:
on (press) {
fscommand("setvalue", "Message A");
}
[ copy and paste the above code ]
Publish the movie as a SWF File, save, and exit Flash MX.
Now, you will get to use the above animation in Visual Basic:
Run Visual Basic, and start a new
Standard EXE project.
Go to “Project | Components”, then look for the component called: “Shockwave Flash” this comes with every Flash Movie Player install, so if you can view Flash movies, you should be fine:

[
the shockwave flash component ]
Drag an instance of the Shockwave
Flash component into your main form. Add a Text
Box, and a button.
Go to the Code Editor, and enter the following code:
Private Sub Command1_Click()
Call ShockwaveFlash1.SetVariable("testVar", "Message B")
'This sets the _ value of the variable in the Flash Project.
End Sub
Private Sub Form_Load()
Call ShockwaveFlash1.LoadMovie(0, CurDir + "/vbSample.swf")
‘This loads the movie that was made into level 0 of the project.
End Sub
Private Sub ShockwaveFlash1_FSCommand(ByVal command As String, ByVal args _As String)
Text1.Text = args
'this catches the action sent by Flash, and uses it in the TextBox.
End Sub
[ copy and paste the above code ]
That’s it! Make the EXE file, and save it in the same folder as the flash movie, then run the exe!
If you have any questions, please do not hesitate to post on the forums at: kirupaForum.
Just a final word before we wrap up. What you've seen here is freshly baked content without added preservatives, artificial intelligence, ads, and algorithm-driven doodads. A huge thank you to all of you who buy kirupa's books, became a paid subscriber, watch the videos, and/or interact on the forums.
Your support keeps this site going! 😇
:: Copyright KIRUPA 2026 //--