Parsing an XML response on AS3
i have this response from a socket server:
开发者_StackOverflow中文版[DataEvent type="data" bubbles=false cancelable=false eventPhase=2 data="Segunda vez"]
How can i parse this info?, for example if i want the data value.
set an event listener on the object that is dispatching the event:
myDispatcher.addEventListener("data", dataEventHandler);
//would be better to have a constant. perhaps DataEvent.DATA is the constant?
then call the data in the event handler:
function dataEventHandler(evt:DataEvent):void
{
trace(evt.data) //Segunda vez
}
精彩评论