Weird. Have just been working on a project in AS3, and have been scratching my head over a blank trace from what (as far as I could see) should be a simple XML lookup.
[kml_flashembed movie="/blog/swf/xml_trace.swf" height="350" width="300" version="9" /]
Direct link to SWF
An example of the XML im using :
<pictures>
<img src="example.jpg" />
</pictures>
The ActionScript :
function BuildImageList(vXML:XML):void{
trace(vXML.pictures.img);
}
As far as I was aware, this should output <img src=”example.jpg” />, but it doesn’t – it just outputs blank. However, if I change the XML file and add a second <img /> node :
<pictures>
<img src="example.jpg" />
<img src="example.jpg" />
</pictures>
… it works . As expected, it traces 2 <img /> nodes. Is this a bug, or am I missing something?