-6

the Errors & sources :

1120: Access of undefined property projectsNum.
projectsNum = projectTitle.length();

1120: Access of undefined property newsTitleArray.
newsTitleArray = xmlData.news.article.title.text().toXMLString().split("\n") ;

1120: Access of undefined property newsTitleArray.
newsTitleArray.reverse();

1120: Access of undefined property newsInfoArray.
newsInfoArray = xmlData.news.article.info.text().toXMLString().split("\n") ;

1120: Access of undefined property newsInfoArray.
newsInfoArray.reverse();

1120: Access of undefined property newsContentArray.
newsContentArray = xmlData.news.article.Content.text().toXMLString().split("\n") ;

1120: Access of undefined property newsContentArray.
newsContentArray.reverse();

my XML actions the action i Doubt the error is in :

//XML LISTS//
//=========//

var projectTitle:XMLList;
var projectAuthor:XMLList;
var projectImage:XMLList;
var projectProgz:XMLList;
var projectHyper:XMLList;

var newsTitle:XMLList;
var newsInfo:XMLList;
var newsContent:XMLList;

var projectNum:Number;
var newsNum:Number;

var xml:XMLLoader = new XMLLoader(this,"data.xml");

function getXML(xmlData:XML):void {

    projectTitle = xmlData.projects.project.Title;
    projectAuthor = xmlData.projects.project.Author;
    projectImage = xmlData.projects.project.image_path;
    projectProgz = xmlData.projects.project.Progz;
    projectHyper = xmlData.projects.project.link;

    newsTitle = xmlData.news.article.title;
    newsInfo = xmlData.news.article.info;
    newsContent = xmlData.news.article.content;

    projectsNum = projectTitle.length();
    newsNum = newsTitle.length();

    newsTitleArray = xmlData.news.article.title.text().toXMLString().split("\n") ;
    newsTitleArray.reverse();

    newsInfoArray = xmlData.news.article.info.text().toXMLString().split("\n") ;
    newsInfoArray.reverse();

    newsContentArray = xmlData.news.article.content.text().toXMLString().split("\n") ;
    newsContentArray.reverse();

}

the source files files

and i'm not posting any other code cuz i don't know where the error might be but i've uploaded the source files files if u needed them

aymanzzz
  • 9
  • 2
  • 9
  • Before asking a question about a compiler error please take the time to search first. Simply pasting the error into The Google will usually get you an answer: http://www.as3errors.com/1120-access-of-undefined-property also: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/compilerErrors.html – Cadin Feb 28 '12 at 22:33
  • @aymanzzz, please don't use stackoverflow as your debugger. Pasting error messages and expecting others to do your error checking for you is not the purpose of stackoverflow. – Lars Blåsjö Feb 28 '12 at 22:42
  • hey easy on me i'm still a noob in this @Cadin i've searched google but i didn't understand so i put this question hoping that someone can help me – aymanzzz Feb 28 '12 at 23:26

1 Answers1

0

When you see the error:

1120: Access of undefined property 'VariableName'.

This means you have not defined or declared the variable (or function when accessing it as a property of an object/class). Here is an overview:

1120: Access of undefined property projectsNum.
projectsNum = projectTitle.length();  // You have declared [var projectNum:Number;] Error source = s --> project[s]Num [Reason #1] 

1120: Access of undefined property newsTitleArray. // I do not see a declaration for this variable [Reason #2]
newsTitleArray = xmlData.news.article.title.text().toXMLString().split("\n") ;

1120: Access of undefined property newsTitleArray. // [Reason #2]

newsTitleArray.reverse();

1120: Access of undefined property newsInfoArray. // [Reason #2]

newsInfoArray = xmlData.news.article.info.text().toXMLString().split("\n") ;


1120: Access of undefined property newsInfoArray. // [Reason #2]

newsInfoArray.reverse();


1120: Access of undefined property newsContentArray. // [Reason #2]

newsContentArray = xmlData.news.article.Content.text().toXMLString().split("\n") ;


1120: Access of undefined property newsContentArray. // [Reason #2]

newsContentArray.reverse();

Seems like a simple mistake to me. I hope this helps.

weltraumpirat
  • 22,544
  • 5
  • 40
  • 54
Haleeq Usman
  • 811
  • 9
  • 11