Online due to the electronic interactive map of the amount of information is too large, can be completed through the client's vast number of operators to complete the work of labeling, so you must realize the function of online tagging. And this kind of function relies on flash itself is unable to realize alone. We can use ASP, asp.net, PHP and other assistance to achieve. In this case, we use ASP to implement the online tagging function together.
1, the basic communication process
Diagram 1swf+xml and communication process diagram
Click to see the big picture
Figure 1 shows the communication process in this example. The end script that passes information between Flash and reads and writes data in XML format.
Use ActionScript to convert the information gathered in the SWF file into an XML object, and then send the data as an XML document to the end script. You can also use ActionScript to load the returned XML document into an XML object in order to use the document in a SWF file. In this case, saving the relevant XML data is done by the scripting program, which is also the focus of this example.
2. Communication method with ASP
There are a variety of communication methods that can be used between communication with ASP, and the Loadvars object is used in this example.
Loadvars can provide a transport variable by using the Post method.
3. Script
The script can be written by a variety of programs, and in this case the ASP is used as an example to write related scripts.
Microsoftactiveserverpages (ASP) is an end-to-end scripting environment that you can use to create and run dynamic, interactive Web applications.
Scripting languages are written using the relevant scripting language, which is the language between HTML and programming languages such as Java, C + +, and VisualBasic. HTML is typically used to format text and link pages. Programming languages are often used to send a series of complex instructions to a computer. Scripting languages can also be used to send instructions to computers, but their syntax and rules are not as rigorous and complex as the compiled programming language. Scripting languages are used primarily for formatting text and using compiled components written in a programming language.
ASP makes it possible for Web developers to write complete procedures in a variety of scripting languages. In fact, multiple scripting languages can be used within a single. asp file.
We can use any of the scripting languages whose corresponding script engine is installed on the web. Typically, both VBScript and JavaScript are used, where the ASP default scripting language is VBScript. This example writes a script in VBScript.
Let's take a look at the specific examples produced here.
Example production:
1, Flash end
First, create the following interface, the code to capture the points mentioned in the previous lecture, this example is only in addition to the name of the names, add some basic information, the method is the same, and here will not repeat it, and eventually assign the code that needs to be saved to the string variable SENDDATA_SRT.
Figure 2SWF File Interface 1
Click to see the big picture
Figure 3SWF File Interface 2