0
我開發了一個應用程序,我想在android.i中加載SWF文件已成功加載非交互式(線性) swf文件。但我不能查看用戶交互式(非線性)文件,基本上在動作腳本2.0中設計的Flash中。在這裏,我附上我的代碼,你可以給我解決方案嗎?在webview中加載交互式swf的問題
package com.aaa;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
public class aaa extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
try{
WebView wv=(WebView) findViewById(R.id.webView1);
wv.getSettings().setJavaScriptEnabled(true);
wv.getSettings().setPluginsEnabled(true);
String html ="<object width=\"550\" height=\"400\"> " +
"<param name=\"movie\" value=\"file:///android_asset/nxt.swf\"> " +
"<embed src=\"file:///android_asset/nxt.swf\" width=\"550\" height=\"400\"> " +
"</embed> </object>";
wv.setWebViewClient(new HelloWebViewClient());
String mimeType = "text/html";
String encoding = "utf-8";
wv.loadDataWithBaseURL("null",html, mimeType, encoding, "");
}catch (Exception e)
{
e.printStackTrace();
}
}
}
main.xml中
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/white"
>
<WebView android:id="@+id/webView1" android:layout_width="match_parent" android:layout_height="match_parent"></WebView>
</LinearLayout>
你有沒有Adobe教程 – VENKI