7 document.getElementById("main").style.display = "none";
8 (mainというIDが振られている要素の表示を消す)
9 this.effectSound.pause();
10 this.effectSound.currentTime = 0;
11 this.effectSound.play();
12 this.backgroundImage = new Image();
13 this.backgroundMusic = document.getElementById('BGM006');
14 this.effectSound = document.getElementById('SE_Select');
17 this.backgroundImage.manager = this;
18 this.backgroundImage.onload = this.backgroundLoaded;
19 this.backgroundImage.src = "title.gif";
22 this.backgroundMusic.loop = true;
23 this.backgroundMusic.play();
26 -MicrosoftInternetExplorerでは、ローカル変数でparentを使うとappendChildが使えなくなる…。
27 -囲まれたブロックの後の末尾部分が実行されない???
28 loadStageFromNetwork: function(name){
29 //URL_PCD_Stage/name.jsを利用してステージを作成する。
30 request = this.networkManager.CreateRequestObject();
32 request.open('GET', URL_PCD_Stage + name + ".js", false);
33 this.networkManager.RequestObjectDisableCache(request);
36 if(request.status == 0){
37 alert("ネットワークにアクセスできません。" + request.status + ":" + request.statusText);
38 }else if((200 <= request.status && request.status < 300) || (request.status == 304)){
39 var stage = eval(request.responseText);
40 mainManager.runStage(stage);
42 alert("サーバーがエラーを返しました。" + request.status + ":" + request.statusText);
47 --以下のコードで解決できる。どこでも良いので実行させる。http://qiita.com/rev84/items/f7ca6a2af00daefa065c
57 IEではXMLHTTPRequest.onreadystatechangeのthisの値が他と異なるようだ。
59 request.onreadystatechange = function(){
60 と無名関数で書いて、内部でrequestインスタンスを参照