SWF in WebView?!

slagusev

New Member
Licensed User
Longtime User
How to make that Webviev lost swf file from internal memory applications?

Try this code:
B4X:
Sub Process_Globals

End Sub

Sub Globals
Dim WebView1 As WebView
End Sub

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
WebView1.LoadUrl("file:///android_asset/book.swf")
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

But in the application runs just blank white window WebView
 

alfcen

Well-Known Member
Licensed User
Longtime User
Your code is correct, slagusev,

You just need to download and install the Adobe Flash Player.
In order to scale your flash, I recommend loading an HTML file, such as this:

B4X:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>SWF Example</title>

</head>
<body>
   <object style="display: block;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="100%" height="100%" id="theBook">
      <param name="FlashVars" value="">
      <param name="menu" value="false">
      <param name="SRC" value="book.swf">
      <embed FlashVars="" src="book.swf" menu="false" pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="100%" height="100%" name="theBook"></embed>
   </object>
</body>
</html>

The <object> tag can certainly be simplified. Just try and play with it.
 
Upvote 0

shaxboz

Member
Licensed User
Longtime User
Your code is correct, slagusev,

You just need to download and install the Adobe Flash Player.
In order to scale your flash, I recommend loading an HTML file, such as this:

B4X:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>SWF Example</title>

</head>
<body>
   <object style="display: block;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="100%" height="100%" id="theBook">
      <param name="FlashVars" value="">
      <param name="menu" value="false">
      <param name="SRC" value="book.swf">
      <embed FlashVars="" src="book.swf" menu="false" pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="100%" height="100%" name="theBook"></embed>
   </object>
</body>
</html>

The <object> tag can certainly be simplified. Just try and play with it.

It is not working? How can I open swf file with webview?
 
Upvote 0
Top