Wirelessly WebView reads HTML while embedding the Flex SWF, interacting

Source: Internet
Author: User

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.

  1. <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= "> "
  2. <param name= "movie" value="client.swf?v=3">
  3. <param name="wmode" value="opaque"/>
  4. <param name="quality" value="High" />
  5. <param name="flashvars" value="p1=222&p2=333" />
  6. <param name="menu" value="false"/>
  7. <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=>  
  8. </embed>
  9. </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

    1. Need to introduce
    2. Import mx.core.Application;
    3. Gets the Flashvars Object
    4. var params:*= Application.application.parameters;
    5. You can also specify a parameter
    6. var p1:string = Application.application.parameters.p1;

okay!

Wirelessly WebView reads HTML while embedding the Flex SWF, interacting

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.