tags:

views:

51

answers:

0

Hi I am using this code to load a flash file from a known location:

System.Windows.Forms.Integration.WindowsFormsHost host = new System.Windows.Forms.Integration.WindowsFormsHost();

        // 实例化 axShockwaveFlash1
        AxShockwaveFlashObjects.AxShockwaveFlash axShockwaveFlash1 = new AxShockwaveFlashObjects.AxShockwaveFlash();
        axShockwaveFlash1.FlashCall += new AxShockwaveFlashObjects._IShockwaveFlashEvents_FlashCallEventHandler(axShockwaveFlash1_FlashCall);

        // 装载.axShockwaveFlash1
        host.Child = axShockwaveFlash1;

        // 将 host 对象嵌入FlashGrid
        this.FlashGrid.Children.Add(host);

        // 设置 .swf 文件相对路径
        string swfPath = System.Environment.CurrentDirectory;
        swfPath += @"\sample.swf";

        axShockwaveFlash1.Movie = swfPath;

I have a scenario where the flash file will be added to a resource. I am wondering how to load the file into axshockwaveflash in such a scenario. Please let me know. Thanks N