※再度編集中です。(項目「画像と文章の表示」の追記中)
<script src="staff/theaterconstructor.js" type="text/javascript" charset="shift_jis"></script>
<div id="forward"> : : </div>
<button id="reset">はじめから</button>
<div id="frame"></div>
<div id="msg"></div>
※この項目は書きかけです。
new Theater({
img: [
"img/sample1.gif",
"img/sample9.gif",
"img/sample6.gif"
],
scenario:[
function(){
this.act({
img: "img/sample1.gif",
msg: "actメソッド。次は画像のみの変更。"
});
},
function(){
this.act({
img: "img/sample9.gif"
});
},
function(){
this.act({
msg: "文章のみの変更。次はappearメソッドによる画像のみの変更。"
});
},
function(){
this.appear("img/sample6.gif");
},
function(){
this.speak("speakメソッドによる文章のみの変更。");
}
]
});
new Theater({
filter: 1, //インスタンス生成時に設定(デフォルトになる),
img: [
"img/sample1.gif",
"img/sample2.gif",
"img/sample3.gif"
],
scenario:[
function(){
this.act({
img: "img/sample1.gif",
msg: "ようこそ"
});
},
function(){
this.act({
img: "img/sample2.gif",
msg: "インスタンス生成時の画像切り替え効果指定です。"
});
},
function(){
this.act({
img: "img/sample3.gif",
msg: "actメソッドでの画像切り替え効果指定です",
filter: 100 //actメソッドでの設定(ここのみの設定)
});
}
]
});
new Theater({
outEffect: "Fade", //インスタンス生成時に設定(デフォルトになる),
inEffect: "Appear", //インスタンス生成時に設定(デフォルトになる),
img: [
"img/sample1.gif",
"img/sample2.gif",
"img/sample3.gif"
],
scenario:[
function(){
this.act({
img: "img/sample1.gif",
msg: "ようこそ"
});
},
function(){
this.act({
img: "img/sample2.gif",
msg: "インスタンス生成時の画像切り替え効果指定です。"
});
},
function(){
this.act({
img: "img/sample3.gif",
msg: "actメソッドでの画像切り替え効果指定です",
outEffect: "Squish", //actメソッドでの設定(ここのみの設定)
inEffect: "Grow" //actメソッドでの設定(ここのみの設定)
});
}
]
});