文字檔的檔名為test.txt,與fla檔放在同一個資料夾
AS2.0
var myLoader = new LoadVars();
myLoader.load("test.txt");
myLoader.onData = function(str:String) {
trace(str);
};
AS3.0
var myURLReq:URLRequest = new URLRequest();
myURLReq.url = "test.txt";
var myLoader:URLLoader = new URLLoader();
myLoader.addEventListener("complete", onC);
myLoader.load(myURLReq);
function onC(e) {
trace(myLoader.data);
}
Ercrta 嵐
fscommand("showmenu", false);//封鎖右鍵選單及上面的menu選單
fscommand("trapallkeys",true);//封鎖"CTRL+ENTER"鍵
http://tw.knowledge.yahoo.com/question/question?qid=1509070708413
fscommand("trapallkeys",true);//封鎖"CTRL+ENTER"鍵
http://tw.knowledge.yahoo.com/question/question?qid=1509070708413
Ercrta 嵐
AS2.0
範例檔:
AS3.0
範例檔:http://www.box.net/shared/1g7byr7u4j
http://tw.knowledge.yahoo.com/question/question?qid=1009062804614
範例檔:
AS3.0
範例檔:http://www.box.net/shared/1g7byr7u4j
http://tw.knowledge.yahoo.com/question/question?qid=1009062804614
Ercrta 嵐
AS2.0
getURL("http://www.google.com.tw","_blank");
AS3.0
import flash.net.*;
var myurl:URLRequest=new URLRequest("http://www.google.com.tw");
navigateToURL(myurl,"_blank");
http://tw.knowledge.yahoo.com/question/question?qid=1009050606129
getURL("http://www.google.com.tw","_blank");
AS3.0
import flash.net.*;
var myurl:URLRequest=new URLRequest("http://www.google.com.tw");
navigateToURL(myurl,"_blank");
http://tw.knowledge.yahoo.com/question/question?qid=1009050606129
Ercrta 嵐
TextArea組件放到場景上後,取名為ta
AS2.0
ta.onMouseUp=function(){
trace(ta.text.slice(Selection.getBeginIndex(),Selection.getEndIndex()));
}
AS3.0
ta.addEventListener (MouseEvent.MOUSE_UP , function(e:Event){
trace(ta.text.slice(ta.selectionBeginIndex,ta.selectionEndIndex));
})
http://tw.knowledge.yahoo.com/question/question?qid=1008090411262
AS2.0
ta.onMouseUp=function(){
trace(ta.text.slice(Selection.getBeginIndex(),Selection.getEndIndex()));
}
AS3.0
ta.addEventListener (MouseEvent.MOUSE_UP , function(e:Event){
trace(ta.text.slice(ta.selectionBeginIndex,ta.selectionEndIndex));
})
http://tw.knowledge.yahoo.com/question/question?qid=1008090411262
訂閱:
文章 (Atom)