SWF文档生成

代码
//SWF文件生成
string cmdpath = "C:\WINDOWS\system32\cmd.exe";
                
string swfpath = "";//Flash工具所在路径

                Process p 
= new Process();
                p.StartInfo.FileName 
= cmdpath;
                p.StartInfo.UseShellExecute 
= false;
                p.StartInfo.RedirectStandardInput 
= true;
                p.StartInfo.RedirectStandardOutput 
= true;
                p.StartInfo.RedirectStandardError 
= true;
                p.StartInfo.CreateNoWindow 
= true;

                p.Start();
                
string strOutput = null;
                p.StandardInput.WriteLine(exepath 
+ " " + sourcepath + " -o " + despath);
                
//p.StandardInput.WriteLine(@"c:\FlashPaper2.2\FlashPrinter.exe c:\测试文档.txt -o c:\output.swf");
                p.StandardInput.WriteLine("exit");
                strOutput 
= p.StandardOutput.ReadToEnd();
                Console.WriteLine(strOutput);
                p.WaitForExit();
                p.Close();

//SWF打开

 

代码
//SWF文件打开
<embed id='swf' src='c:\output.swf' quality='high' width='1000' height='600' name='as-js' align='middle' allowscriptaccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />

 

 

posted @ 2010-12-24 09:19  边缘凉风  阅读(222)  评论(0编辑  收藏  举报