Embedding flash.swf in WebBrowser1 errors.

Hello everyone,

My little VB.net code doesn't seem to work,

Code Snippet

PrivateSub Button1_Click(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles Button1.Click

WebBrowser1.Navigate("http://www.x.com/y.swf") 'the button to launch the URL.

EndSub

When I replace with this

Code Snippet

WebBroswer1.Navigate("http://www.x.com")

It woks just fine.

So what do I need to change in the code to allow swf extension usage to be ran from a vb program? Any help would be appreciated.

[1474 byte] By [Hourani] at [2008-1-10]
# 1
If you need to open a swf file in your code, I think this post will be helpfull http://www.thescripts.com/forum/thread457640.html

Here's a work around to use the webbrowser control to do your task:
You can make a code that writes a local html file then use the webbrowser to open this file.
The html file will do nothing except playing the flash file

Code Snippet

<html>
<body>

<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0">
<PARAM NAME="MOVIE" VALUE="swf file name">
<PARAM NAME="PLAY" VALUE="true">
<PARAM NAME="QUALITY" VALUE="best">
<PARAM NAME="LOOP" VALUE="true">
<EMBED SRC="sample.swf" WIDTH="400" HEIGHT="300" PLAY="true" LOOP="true" QUALITY="best"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT></body>
</html>

AmrOuf at 2007-10-3 > top of Msdn Tech,Visual Basic,Visual Basic General...