FLEX4 Flash-to-container information interaction

Source: Internet
Author: User

The Externalinterface class is the class that flex4 flash interacts with the container's solid information. Official definition: The Externalinterface class is used to support direct communication between ActionScript and SWF containers (for example, HTML pages containing JavaScript or desktop applications that use Flash player to play SWF files) programming interfaces with programs.

With the Externalinterface class, you can invoke ActionScript functions in the Flash runtime using JavaScript in an HTML page. The ActionScript function can return a value, and JavaScript will immediately receive it as the return value for that call. This feature overrides the fscommand() method.

Externalinterface.call ("Createxmltext", xmlstr);

The call method is an important method of Externalinterface: Calling a function exposed by the SWF container, passing 0 arguments, or passing multiple parameters. The JS method in the "Createxmltext" container, "xmlstr" is passed to the parameters of the JS method.

Using the Flash Builder tool, the corresponding HTML will be generated in the Bin_debug folder, just add the JS method to the file.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

FLEX4 Flash-to-container information interaction

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.