I have been toying around with the following:
I successfully load the following XML into my Flash as ticketsData:
Code:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ScratchTickets xmlns="http://tempuri.org/">
<encryptedEmailAddress>string</encryptedEmailAddress>
<Tickets>
<Ticket>
<TicketID>int</TicketID>
<PrizeTypeID>int</PrizeTypeID>
</Ticket>
<Ticket>
<TicketID>int</TicketID>
<PrizeTypeID>int</PrizeTypeID>
</Ticket>
</Tickets>
</ScratchTickets>
</soap:Body>
</soap:Envelope>
I am trying to access my Tickets. But I am failing so far.
I tried:
code:
trace('Tickets: '+ticketsData.ScratchTickets.Tickets[0].TicketID);
I get:
Code:
TypeError: Error #1010: A term is undefined and has no properties.
at com.game.tickets::Ticketsdata/readdata()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
when I run this:
code:
trace('Tickets: '+ticketsData.ScratchTickets);
I get this:
How can I get access to the list of <Tickets> ?
Help...
V