VENKI
VENKI

Reputation: 88

how to run the .swf file in android emulator?

i have an swf file in local assets folder i have written the code like

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    Context mContext= PanchangamActivity.this;

     WebView wv=new WebView(mContext);
     wv = (WebView)findViewById(R.id.webView1);
     wv.getSettings().setJavaScriptEnabled(true);
     wv.getSettings().setPluginsEnabled(true);
     wv.getSettings().setAllowFileAccess(true);
     wv.loadUrl("file:///android_asset/www/swf2.html");
 }

SWF2.HTML:

 <html>
   <head>
  <meta http-equiv="Content-Type" content="text/html" charset="UTF-8" />
</head>
<body>
  <object width="215" height="140">
    <param name="movie" value="flash.swh">
      <embed src="c:\Users\janardhan\Desktop\flash.swf"
           width="215" height="140">
      </embed>
  </object>
</body>

now while running that in android emulator i am gettingenter image description here

please help me! how to solve this

Upvotes: 3

Views: 5640

Answers (2)

stv
stv

Reputation: 33

Maybe is just a typo you put here, not in your code, but...

<param name="movie" value="flash.swh">

instead of

<param name="movie" value="flash.swf">

could create some conflicts. And seen you are using

wv.getSettings().setJavaScriptEnabled(true);

I suggest to embed Flash using SWFobject http://code.google.com/p/swfobject/

Upvotes: -1

J&#248;rgen R
J&#248;rgen R

Reputation: 10806

What you see is the missing plugin icon, you don't have the Flash Player installed.

I would recommend reading How can I install adobe flash on the android emulator for information on how to get Flash up and running on the emulator.

Upvotes: 2

Related Questions