※このページは書きかけです。
new Theater({
img: [
"img/sample1.gif",
"img/sample2.gif",
"img/sample3.gif"
],
scenario:[
function(){
this.work.count = 0;
this.act({
img: "img/sample1.gif",
msg: "カウント:" + this.work.count
});
},
function(){
this.work.count++;
this.act({
img: "img/sample2.gif",
msg: "カウント:" + this.work.count
});
},
function(){
this.work.count++;
this.act({
img: "img/sample3.gif",
msg: "カウント:" + this.work.count
});
}
]
});
workオブジェクトそのものを削除したり、work以外の他のメンバを破壊しないように注意してください。
new Theater({
img: [
"img/sample1.gif",
"img/sample2.gif",
"img/sample3.gif"
],
scenario:[
function(){
this.setVal("count", 0);
this.act({
img: "img/sample1.gif",
msg: "カウント:" + this.getVal("count")
});
},
function(){
this.setVal("count", this.getVal("count") + 1);
this.act({
img: "img/sample2.gif",
msg: "カウント:" + this.getVal("count")
});
},
function(){
this.setVal("count", this.getVal("count") + 1);
this.act({
img: "img/sample3.gif",
msg: "カウント:" + this.getVal("count")
});
}
]
});