actually this little trick may work. assuming that your flash files (*.swf) are determined while you develop your application, you can add them as resource files in your project. then:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Test_Flash
{
public partial class Form1 : Form
{
List<string> tempFiles = new List<string>();
public Form1()
{
InitializeComponent();
this.FormClosed += Form1_FormClosed;
}
private void button1_Click(object sender, EventArgs e)
{
string p = Path.GetTempFileName();
this.tempFiles.Add(p);
using(FileStream fs = new FileStream(p, FileMode.Open))
{
fs.Write(Test_Flash.Properties.Resources.harfa, 0,
Test_Flash.Properties.Resources.harfa.Length);
}
this.axShockwaveFlash1.LoadMovie(0, p);
}
void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
tempFiles.ForEach(f1 => File.Delete(f1));
}
}
}