I try to run a .swf
file in my WPF application, I created an html
page and in this I referenced my .swf
file using the object
tag and then loaded this html
page in my Main Window
my xaml looks like
<Window x:Class="sirajflash.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 Name="myBrowser"></WebBrowser> //tried with frame also but no luck </Grid> </Window>
source assignment
public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); myBrowser.Source = new Uri(CreateAbsolutePathTo("playflash.htm"), UriKind.Absolute); } private static string CreateAbsolutePathTo(string mediaFile) { return System.IO.Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).DirectoryName, mediaFile); } }
Problem:
when I launch the application, a warning appears that ActiveX
content is trying to access, etc. etc., and when I allow it nothing appears in my main window, the warning continues to occur several times.
if I run a flash movie in a browser, it works just fine.
Sincerely.
source share