因此,我对三个不同的 XML 文件进行了三个 HTTPService 调用:
<mx:HTTPService id="projectsHttp" url="projects.xml" resultFormat="e4x" makeObjectsBindable="true" result="countProjects(event)" />
<mx:HTTPService id="studentsHttp" url="students.xml" resultFormat="e4x" makeObjectsBindable="true" result="createStudentsCollection(event)" />
<mx:HTTPService id="dprepHttp" url="directorsPrep.xml" resultFormat="e4x" makeObjectsBindable="true" result="createPhase(event)" />
前两个工作得很好......但最后一个根本行不通。出于测试目的,createPhase 函数如下所示:
public function createPhase(e:ResultEvent):void
{
Alert.show("Testing");
}
此外,directorsPrep.xml 文件如下所示:
<?xml version="1.0" encoding="utf-8"?>
<directorspreps>
<directorsprep>
<prepid>1</prepid>
<title>dir. prep. 1</title>
<workingtitle>dp1 WT</workingtitle>
<startdate>7/7/2011</startdate>
<numdays>2</numdays>
<positions>
<role>1D</role>
<role>2D</role>
<role>1C</role>
</positions>
</directorsprep>
<directorsprep>
<prepid>2</prepid>
<title>dir. prep. 2</title>
<workingtitle>dp2 WT</workingtitle>
<startdate>7/10/2011</startdate>
<numdays>3</numdays>
<positions>
<role>1D</role>
<role>2D</role>
<role>1C</role>
<role>GE</role>
</positions>
</directorsprep>
</directorspreps>
有人看到任何会阻止directorsPrep.xml 文件无法加载的东西吗?
编辑: 我是个白痴......没有做 .send(); :(对不起浪费时间了