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???什么意思???
回答那个问题都给分,呵呵
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???什么意思???
回答那个问题都给分,呵呵
解决方案 »
- SQL 查询时用LIKE时的问题!
- 如何将菜单项对象转换为工具栏按钮对象
- 考试系统题库的设计
- [C#][WinForm]DataGridView disabled会按到背后的按钮
- 谁有C#程序开发范例宝典源代码?
- XmlNodeList cells = doc.SelectNodes("/Report/Body/ReportItems/Table/Header/TableRows/TableRow/TableCells")//出错了吗??
- 请教个基础问题
- 有什么开源软件可以读取arcgis格式的文件?
- datagrid的readonly列改为false后再怎么用呢?
- 不知大家有没有遇到过
- fileupload中如何获取文件名,例如文件名称1.jpg获取到1
- 怎样在DataGridView这个控件中显示出从数据库中读取出来的数据啊?
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文件的代码
------------------
Application.ExecutablePath 在IDE环境中,把鼠标放在上面就有说明的