0 Replies - 6992 Views - Last Post: 11 October 2011 - 03:44 AM

#1 raajesh   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 11
  • Joined: 21-November 08

error in getting object from xml

Posted 11 October 2011 - 03:44 AM

I am stuck at one place where I am trying to capture the object from xml. My code is as below:
for each (var object:XML in myXML.match[0].*)
if (object.name() == "scores-url")
scoreURL = String(object.child(0));

I am able to get the right object but when I use 'scoreURL' as variable in
var scoreLoader:URLLoader=new URLLoader();
scoreLoader.load(new URLRequest(scoreURL));

It does not work. It gives the following error:
Error #1009: Cannot access a property or method of a null object reference.

Can anyone help. I am facing the same problem wherever the xml node name is in the format of "scores-url".
It works fine if the node name is without hiphen sign like :'scoresurl'


Is This A Good Question/Topic? 0
  • +

Page 1 of 1