问题是这样的:我想在代码中特定指定用某flash播放器打开本地的一个swf文件,我应该如何调用这个外部程序,同时把swf文件的路径传递给这个程序让其打开?急用,期待高手解决,谢谢!!!

解决方案 »

  1.   

     读取swf文件没弄过,但是有做过利用word阅读器打开word文档的,方法如下:
    tempfilepath为文件路径,application/msword标明文件格式
    Intent intent = new Intent(Intent.ACTION_VIEW); 
    intent.setDataAndType(Uri.parse("file://" + tempfilepath),"application/msword");  startActivity(intent); 
    这个地方也就格式不一样,相信楼主可以找到合适的方法解决!
      

  2.   

    楼上的,intent是不行的,swf不是内置的支持格式,一般用webview
      

  3.   

    2楼的方法可以去试下。把SWF放到HTML再用webview.loadURL(path)打开。
      

  4.   

    某flash播放器,那你要看人家的播放器有没有提供对外接口了。
    你想播放swf文件,其实自己写个播放器就可以了。
    webview.loadUrl("http://10.1.49.137:8080/Good/jsp/main.jsp?name="
    + name + "&key=" + key);
    main.jsp
    <%
    String name = request.getParameter("name");
    String key = request.getParameter("key");
    out.println(key);
    out.println(name);
    %>
    <div align="center">
    <object width="600" height="409">
    <param name="movie"
    value="test_jieshou.swf"></param>
    <param name="flashvars" value="xian=<%= key %>"></param>
    <param name="allowFullScreen" value="true"></param>
    <param name="allowscriptaccess" value="always"></param>
    <embed
    src="test_jieshou.swf"
    type="application/x-shockwave-flash" 
    allowscriptaccess="always"
    allowfullscreen="true" width="600" height="409"
    flashvars="xian=<%= key %>"></embed>
    </object>
    </div>