AS2.0
以下是我的as类文件代码
class FrontofEntry {
// Properties
private var entryLoader:LoadVars;
// Constructor
public function FrontofEntry(id:Number) {
entryLoader = new LoadVars();
entryLoader.onLoad = function(success:Boolean) {
if (success) {
_level0.entryID = "ID of Entry: "+this.ID;
_level0.vocSpeech = "Part of Speech: "+this.Speech;
_level0.vocWord = "Word to Learn: "+this.Word;
_level0.vocContext = "Context: \n"+this.Context;
_level0.vocSource = "Source: "+this.Source;
_level0.vocDate = "Date of Entry: "+this.Date;
} else {
_level0.entryID = "Error - Loading Failed!";
}
};
entryLoader.load("GetDetails.asp?Entry="+id);
}
}
以下是fla文件代码:
var firstEntry:FrontofEntry = new FrontofEntry(0);
本人系统win xp pro sp3 with iis 5.1
为什么用Flash测试的时候output总是提示:
Error opening URL 'file:///D|/Websites/VocabularyPool/GetDetails.asp?Entry=0'
但在localhost上测试的时候却
比较正常。
之所以是“比较”正常,原因如下:
每对fla或as文件进行一些改动后刷新localhost页面,页面里面的swf并不相应的变化,而是要退出浏览器后重启程序,才能看到相应的变化,为什么?
注,鄙人首次用asp+as,所以有N多哩不懂,还望大虾指点!!!!