的错误&源的访问:AS3 - 编译器错误1120:未定义的属性* 7
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();
我的XML行动的行动,我怀疑的错误是:
//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如果你需要他们
在提出有关编译器错误的问题之前,请花时间先查找。简单地将错误粘贴到Google中通常会给您一个答案:http://www.as3errors.com/1120-access-of-undefined-property:http://help.adobe.com/zh_CN/FlashPlatform/reference /actionscript/3/compilerErrors.html – Cadin 2012-02-28 22:33:27
@aymanzzz,请不要使用stackoverflow作为您的调试器。粘贴错误消息并期望别人为你做错误检查不是stackoverflow的目的。 – 2012-02-28 22:42:58
嘿在我身上很容易我仍然是这个@Cadin的菜鸟我搜索谷歌,但我不明白,所以我把这个问题希望有人可以帮助我 – aymanzzz 2012-02-28 23:26:41