This Blog contains About Action script 3.0 Variables, Data types, Access specifies, Keywords, Operators, Conditional statements, Control statements, Arrays (Indexed, Associative, Multidimensional, Cloning), Functions, Symbols, Movie clips (Transformation point, Registration point, Loading images), Buttons, Events (Key board, Mouse, Timer, XML)Pre- defined function :- Random, Hit test object, Drag and drop, Sort, Loader, Tween,URL Loader, Video components, Audio Components, Sound Channel.
Friday, 8 March 2013
How to receive data through xml in as3
Code :-
=====
var XMLreceive:URLRequest = new URLRequest("XML.xml");
var XMLreceiveLoader:URLLoader = new URLLoader(XMLreceive);
XMLreceiveLoader.addEventListener("complete",XMLreceivefun1);
function XMLreceivefun1(event:Event):void
{
var XMLDoc:XMLDocument = new XMLDocument();
XMLDoc.ignoreWhite = true;
var XMLreceive1:XML = XML(XMLreceiveLoader.data);
XMLDoc.parseXML(XMLreceive1.toXMLString());
trace(XMLDoc.firstChild.childNodes[0].childNodes[0].childNodes[0]);
//trace(XMLDoc.firstChild.childNodes[0].childNodes[1].childNodes[0]);
}
Out put :-
=======
63
File Structure :- ( For send and receive )
===========
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment