的錯誤&源的訪問: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