i am trying to run a .swf
file in my WPF application, i have created a html
page and in that i have referenced my .swf
file using
I have a flash based clock as a .swf file on my C:\Test\MyClock.swf
I have a htm file at C:\Test\MyHtml.htm
<embed src=C:\Test\MyClock.swf
width=200 height=200
wmode=transparent type=application/x-shockwave-flash>
</embed>
I have web browser control as below...
<Window x:Class="MyFlashApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<WebBrowser Source="C:\Test\MyHtml.htm"></WebBrowser>
</Grid>
</Window>
On running the app, I see the webbrowser control giving warning as "To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer. Click here for options."
I accept the warning by right click and the left click "Allow Blocked Content". A confirmation popup appears to which I say Yes
.
I see the Flash based clock.
WebBrowser control can support flash directly . If you don't need to present anything in HTML then you can directly provide the path to the flash file .
myWebBrowser.Source = "C:\Test\MyClock.swf"
However you will still get the IE warning message.