package LoginFunctions.UI{
import flash.display.*;
import flash.events.*;
public class CheckStudentInfo extends Sprite {
private var studentInformation: StudentInformation;
private var dataSet:Array;
public function CheckStudentInfo():void {
studentInformation = new StudentInformation("studentInformation");
studentInformation.addEventListener("DATALOADED",
loadStudentRecord);
addChild(studentInformation);
}
private function loadStudentRecord(event:Event):void {
trace("DATALOADING");
dataSet = studentInformation.retrieveData();
trace("DATACOMPLETE");
}
}
}
package LoginFunctions.UI{
import flash.net.*;
import flash.events.*;
import flash.display.*;
public class StudentInformation extends Sprite {
public function StudentInformation
(passURL:String) {
setData();
}
public function setData():void {
dispatchEvent(new Event("DATALOADED"));
}
}
當我run Class CheckStudentInfo 時, "DATALOADING" 和 "DATACOMPLETE" 都不能
output, 請問您們知道是什麼原因嗎?
--
您收到此郵件,是因為您訂閱了 Google 網上論壇的「台灣 Adobe 使用者俱樂部 」群組。
如要在此群組張貼留言,請寄電子郵件至 au...@googlegroups.com
如要取消訂閱此群組,請寄電子郵件至 augtw-un...@googlegroups.com
如需更多選項,請造訪此群
組:http://groups.google.com.tw/group/augtw?hl=zh-TW?hl=zh-TW 。
On 2月2日, 上午4時54分, Ben Chang <ben.rb.ch...@gmail.com> wrote:
> StudentInformation 建構時,就會執行 setData(),就會送出事件,
>
> 這個時間點 (StudentInformation 建構時),尚未 addEventListener,
>
> 所以建構完成後的 addEventListener 等於是慢一步
>
> > 組:http://groups.google.com.tw/group/augtw?hl=zh-TW?hl=zh-TW。- 隱藏被引用文字 -
>
> - 顯示被引用文字 -