byte[] bb = global::flash2.Properties.Resources._18;
            string savePath = Path.GetDirectoryName(Application.ExecutablePath) + "\\12233.swf";
            FileStream fs = new FileStream(savePath, FileMode.Create, FileAccess.Write);
            BinaryWriter bw = new BinaryWriter(fs);
            bw.Write(bb);
            bw.Close();
            fs.Close();
            fs.Dispose();
            this.axShockwaveFlash1.Movie = savePath;
           this.axShockwaveFlash1.Play();
上面的代码是将项目资源中的Flash弄出来,我看不懂,帮翻译下,谢谢
另外,我只保留
byte[] bb = global::flash2.Properties.Resources._18;
            string savePath = Path.GetDirectoryName(Application.ExecutablePath) + "\\12233.swf";
            this.axShockwaveFlash1.Movie = savePath;
           this.axShockwaveFlash1.Play();
在visual studio 中也能播放flash,但打包后就不行了,这是为什么呀???
Application.ExecutablePath???什么意思???
回答那个问题都给分,呵呵

解决方案 »

  1.   

    //得到获取启动了应用程序的可执行文件的路径
    string savePath = Path.GetDirectoryName(Application.ExecutablePath) + "\\12233.swf"; 
    //创建文件
      FileStream fs = new FileStream(savePath, FileMode.Create, FileAccess.Write); 
    //文件的内容为最开始读取的内容
    byte[] bb = global::flash2.Properties.Resources._18; 
    //写完以后释放资源
    bw.Close(); 
                fs.Close(); 
                fs.Dispose(); 
    //指定路径播放刚才生成的flash
    this.axShockwaveFlash1.Movie = savePath; 
              this.axShockwaveFlash1.Play(); ==============================================
    你删除的代码就是生成你播放的flash文件的代码
      

  2.   

    Application.ExecutablePath???什么意思??? 
    ------------------
    Application.ExecutablePath 在IDE环境中,把鼠标放在上面就有说明的