XMLSocket

XMLSocket

XMLSocket is a class in ActionScript which allows Adobe Flash content to use socket communication. It can be used for plain text, although, as the name implies, it was made for XML. It is often used in chat applications and multiplayer games.

Examples

ActionScript 2.0

For a simple Hello, World! application in ActionScript 2.0, you could use the code below:

var xmlSocket:XMLSocket=new XMLSocket();xmlSocket.onConnect=function() { xmlSocket.send(new XML("Hello, World!"));}xmlSocket.onXML=function(myXML) { trace(myXML.firstChild.childNodes [0] .firstChild.nodeValue); xmlSocket.close();}xmlSocket.connect("localhost",8463);

This would result in the output window of the Flash IDE opening and displaying "Hello, World!", assuming that a socket server was running on port 8463 of the local machine, and was echoing everything sent to it.


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • XML socket — XMLSocket est un protocole implémenté par le langage ActionScript qui permet à une animation Adobe Flash de communiquer au dessus de TCP grâce à des Sockets. Il permet le transfert de données textuelles brutes (texte) ou hiéarchiques (XML ,xHTML) …   Wikipédia en Français

  • Adobe Flash — (formerly Macromedia Flash) is a multimedia platform used to add animation, video, and interactivity to web pages. Flash is frequently used for advertisements, games and flash animations for broadcast. More recently, it has been positioned as a… …   Wikipedia

  • Ming library — Not to be confused with MinGW or MNG. Ming is a C library for creating Adobe Flash (.swf) files. It is often packaged as a PHP module that allows for the dynamic generation of Flash animations. In addition to PHP, the library can also be… …   Wikipedia

  • Flash animation — Simple animation in Flash MX; a square moving across the screen in a motion tween, one of the basic functions of Flash. Onion skinning is used to show the apparent motion of the square. A Flash animation or Flash cartoon is an animated film which …   Wikipedia

  • Adobe Flash Media Server — Infobox Software name = Adobe Flash Media Server caption = Using Adobe Flash 8 (bundled in Studio 8) in Windows XP. developer = Adobe Systems latest release version = 3 latest release date = December 4, 2007 operating system = Windows, Linux… …   Wikipedia

  • Action script — ActionScript ActionScript est le langage de programmation utilisé au sein d applications clientes (Adobe Flash, Adobe Flex) et serveur (Flash media server, JRun, Macromedia Generator). ActionScript est un langage de script, orienté objet et… …   Wikipédia en Français

  • Actionscript — est le langage de programmation utilisé au sein d applications clientes (Adobe Flash, Adobe Flex) et serveur (Flash media server, JRun, Macromedia Generator). ActionScript est un langage de script, orienté objet et prototype, basé sur ECMAScript… …   Wikipédia en Français

  • Adobe Flash Media Server — Flash Media Server (FMS) est un produit commercial serveur d Adobe Systems Inc. (qui a racheté Macromedia). Ce serveur fonctionne avec le lecteur Flash pour permettre des animations interactives, multi utilisateurs : Rich Internet… …   Wikipédia en Français

  • Adobe Flash Media Server FMS — Adobe Flash Media Server Flash Media Server (FMS) est un produit commercial serveur d Adobe Systems Inc. (qui a racheté Macromedia). Ce serveur fonctionne avec le lecteur Flash pour permettre des animations interactives, multi utilisateurs  …   Wikipédia en Français

  • Applet Flash — Adobe Flash Pour les articles homonymes, voir Flash. Adobe Flash …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”