Analysis of Flash and Javascript communication examples

Source: Internet
Author: User

1. Add the following code to the Flash file, which may be called an action in Flash:

Copy to ClipboardReference: [www.bkjia.com] on (release)
{
Fscommand ("command name", "parameter ");
}

If you want to pass the value of a text box in Flash to the webpage for Javascript to obtain it, you can do this:

Copy to ClipboardReference: [www.bkjia.com] on (release)
{
Fscommand ("send_userName", text box Instance name. text );
}

In a Javascript script:

Copy to ClipboardReference: [www.bkjia.com] function myFlash_DOFSCommand (command, args)
{
If (command = "send_userName ")
Alert (args );
}

Args is the value in the text box passed from Flash.

Fscommand is a built-in function of Flash. It cannot pass multiple parameters at a time. If you want to pass multiple parameters at a time, you can only

Every time fscommand ("send_userName", text box Instance name. text); Khan !!!!

In addition, the "text box Instance name" cannot be a keyword. Hey, this is a problem today. I tried it many times, but the value was just a few minutes, it turns out that you have no intention to use the As keyword. To achieve these two points, there should be no major problems.

Related Article

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.