Hello all,
I am using an ArrayCollection, outputted from an HTTPService. I wish
to access the 'id' attribute from an XML file. I've tried using the
e4x methods to no avail. I get an error:

"TypeError: Error #1010: A term is undefined and has no properties."

If I add the resultFormat="e4x" to the HTTPService, I get the error:

"Type Coercion failed: cannot convert [EMAIL PROTECTED] to
mx.collections.ArrayCollection."

Any help would be appreciated...

Here's a code snippet below:

[Target XML]
<ma> 
  <sitelist>
    <item id="11113">
      <name>weebls-stuff forums weebls-stuff forums</name>
      <url>http://forums.weebls-stuff.com/</url>
      <pubdate>1-1-08</pubdate>
      <live>true</live>
    </item>
  </sitelist>
</ma>

[AS3 snippets]
...

<mx:Script>
function init()
{
  siteDataIn.send();
}

function siteHandler(event:ResultEvent):void
{
  sites = event.result.ma.sitelist.item;
}

function getSiteData(repeatData:MouseEvent):void
{
  ...
  var site:Object = repeatData.target.getRepeaterItem();
  trace(board.attribute(id)); <-- this is where things blow up!!!
}

</mx:Script>

<mx:HTTPService id="siteDataIn" url="..." result="siteHandler(event)"/>

...

        

Reply via email to