alt
Advertisement
Sponsored links
Online Training
Career Series
Exforsys
Exforsys arrow Tutorials arrow XML arrow Working with XML in Flash
Site Search


Working with XML in Flash
Article Index
Working with XML in Flash
Variables and Visual Elements

Working with XML in Flash

To integrate an XML document with Flash, we need an XML document that works with Flash, one that can set up the visual movements of the action movie and define the script that will be used for the code of the action movie.

How do We Integrate XML and Macromedia Flash?

IMEX stands for Imaginary Macromedia Exchange, and IMEX is also a client server application. There has to be a protocol to interact between the client and the server. The protocol must also be designed in such a way that it fulfills all the requirements of the system.

However, for information to be traded in IMEX, there are some prior requirements which have to be fulfilled like the information that is being transmitted must be secure, and all user accounts that will be used must be protected by a password, and users need to have access to their portfolio and all the information provided must be current. In addition to this, users should be able to carry out commercial transactions using the IMEX securities.

Flash supports XML data transfers, but IMEX cannot support real time trading so for this purpose the HTTP based XML support for data is used.

How is Data Transmitted Safely?

Based on the very first requirement of the IMEX server, the data must be transmitted in hypertext transfer protocol safely and securely. Usually URL's or Universal Resource Identifiers while playing a Flash movie will have HTTPs instead of HTTP because it means the data is secure. The IMEX servers should be capable of handling HTTPs requests for the data to be transferred through these servers.

Coming to the second condition, which is the password protection clause, every user needs to have a user name and password. The server will also have a database of passwords and usernames which will be authenticated as and when needed, for which the Flash movie will ask before it plays the movie. Once the user enters the login information, then the movie transmits that information to the XML server.

The login element however is not a predetermined value, and the XML document lets it create XML elements which are specific to the application. The protocol that will be used to carry out all these transactions is called the IMEX XML, and is an application based on XML which has specific XML elements. and they are designed especially for IMEX. Only when the password is accepted can the server respond, otherwise it returns a null value.

If the password is rejected then the server returns a login failed message. Every login session creates a session ID which will be used between the client server through out the session, and as long as the session lasts.

Coming to the third requirement, the IMEX server of users must be allowed to access current information about their portfolio, since this information is stored on the server and the Flash movie has to download this information. Once the user requests the Flash movie to be downloaded, or the portfolio information, the Flash movie transfers this request to XML. After this process the server comes back with a response with an XML element which contains portfolio information and more elements which are holding.

The fourth requirement is to trade securities. The user will enter one or more transactions of buy or sell into the Flash movie, and the movie forwards it to XML as a transaction. This transaction may contain one or more buy and sell activities. Each transaction element can have more than one trade element. To confirm the transaction, the server returns the value as a transaction reply element.



 
< Prev   Next >
Exforsys Offers
© 2008 Exforsys.com
Joomla! is Free Software released under the GNU/GPL License.
Page copy protected against web site content infringement by Copyscape