Simple SWF Loader
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
7 posts
Page 1 of 1
I have seen these around but I thought I would make a simple tutorial.
Add a panel and dock fill it Top
Put a textbox and a button inside.
Add a web browser and dock it to fill
First, Add this code to the button1.Click
Add this code:
tell me what you think
Add a panel and dock fill it Top
Put a textbox and a button inside.
Add a web browser and dock it to fill
First, Add this code to the button1.Click
Code: Select all
Next, lets make it so the Enter key will also load the SWF, click the Textbox and in the properties click the Event button scroll down to KeyUp and double click it. If TextBox1.Text.Contains("swf") = True Then
WebBrowser1.Navigate(TextBox1.Text)
Else
MsgBox("You can only load SWF Files!")
End If
Add this code:
Code: Select all
Pretty simple If e.KeyCode = Keys.Enter Then
If TextBox1.Text.Contains("swf") = True Then
WebBrowser1.Navigate(TextBox1.Text)
Else
MsgBox("You can only load SWF files!")
End If
End If

Last edited by smashvb on Sun Feb 06, 2011 9:43 am, edited 1 time in total.
I think its great for newbies, but there is other ways too. Like right clicking the toolbox, press 'Choose Items' And find a component named 'AxShockwaveFlash' or something like that.
And you forgot an end parentheses in the first code box:
And you forgot an end parentheses in the first code box:
Code: Select all
If TextBox1.Text.Contains("swf") = True Then
WebBrowser1.Navigate(TextBox1.Text '<-------- There it is
Else
MsgBox("You can only load SWF Files!")
End If
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
![Image]()
![Image]()
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!

yeah I do know the Flash Component but I left it as a WebBrowser because then you make it so it loads web pages too if you wanted too
Yeah i know. But you should fix that code, else you will get many posts its not working
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
![Image]()
![Image]()
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!

I think it would be better if you used endswith , there might be a website called "www.swfthings.com"
so
so
Code: Select all
'true' isn't neededIf TextBox1.Text.endswith(".swf") Then
7 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023