Wirelessly WebView reads HTML while embedding the Flex SWF, interacting
Android activity and HTML interaction is very simple, with JavaScript interface, online a bunch of examples, basically not much problem.
Embedding SWF in HTML and interacting with it is a bit of a hassle, I used the externalinterface did not succeed, the brother station successfully can communicate. I'm using a flashvars,
Without changing the configuration, HTML can pass data to the SWF.
- <object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="/http/ download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0 " width="940 " height= "> "
- <param name= "movie" value="client.swf?v=3">
- <param name="wmode" value="opaque"/>
- <param name="quality" value="High" />
- <param name="flashvars" value="p1=222&p2=333" />
- <param name="menu" value="false"/>
- <embed src= "client.swf" quality= "High" wmode= "opaque" Pluginspage= "http://www.adobe.com/shockwave/download/download.cgi?" P1_prod_version=shockwaveflash " type=" application/ X-shockwave-flash " flashvars=" p1=222&p2= 333 " width=" 940 " Height=>
- </embed>
- </Object>
This can be specified in Flashvars, or you can specify parameters by using the SWF URL in movie or SRC, such as v above.
Flex Code
- Need to introduce
- Import mx.core.Application;
- Gets the Flashvars Object
- var params:*= Application.application.parameters;
- You can also specify a parameter
- var p1:string = Application.application.parameters.p1;
okay!
Wirelessly WebView reads HTML while embedding the Flex SWF, interacting