Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | RE: FLASH: Reading data from the xml socket |
From: | Jon Williams |
Date: | Sun, 10 Sep 2000 02:47:05 +0100 |
can you trace the doc that arrives w/o checking
if the nodename is "input" first? that might be
the source of trouble.
-j
-----Original Message-----
From: ownerchinwag [dot] com [ownerchinwag [dot] com]On">mailto:ownerchinwag [dot] com]On Behalf Of Adrian
Harris
Sent: Friday, September 08, 2000 11:43 PM
To: flasherchinwag [dot] com
Subject: FLASH: Reading data from the xml socket
I connect:
stop ();
sock = new XMLSocket();
sock.connect("something.com", 3742);
function onSockConnect (success) {
if (success) {
gotoAndStop (4); //start communicating
} else {
gotoAndStop (3); //error screen
}
}
sock.onConnect = onSockConnect;
I send:
on (release) {
// Create XML to send
tosend = new XML();
updata = tosend.createElement("input");
updata.attributes.text = input;
tosend.appendChild(updata);
sock.send(tosend);
}
... so far so good. I know this gets to the server. The server just
echoes it back. Now try to read the response which is supposed to be
hiding in the socket obect:
function showit(doc) {
var e = doc.firstChild;
if (e != null && e.nodeName == "input") {
displayMessage(e.attributes.text);
}
}
function displayMessage(info) {
output = info;
}
sock.onXML = showit;
Nothing.
Would be grateful to anyone with any ideas or who points out silly mistakes.
Regards,
Adrian
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
____________________________________________
http://1cis.com
Free E-mail Servers with unlimited mailboxes
1st Class Internet Solutions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
FLASH: Reading data from the xml socket, Adrian Harris
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]