| 2、将组件“showloop”从图库中拖放到场景中,命名为“showloop”。
3、在场景中的“查看”Button的Action面板上依次增加下面的语句:
Button 0上增加:
on(release){
loadVariables("show.htm?id=" add _root.id0,
this, "POST");
_root.showloop.gotoAndPlay(2);
}
Button 1上增加:
on(release){
loadVariables("show.htm?id=" add _root.id1,
this, "POST");
_root.showloop.gotoAndPlay(2);
}
Button 2上增加:
on(release){
loadVariables("show.htm?id=" add _root.id2,
this, "POST");
_root.showloop.gotoAndPlay(2);
}
Button 3上增加:
on(release){
loadVariables("show.htm?id=" add _root.id3,
this, "POST");
_root.showloop.gotoAndPlay(2);
}
Button 4上增加:
on(release){
loadVariables("show.htm?id=" add _root.id4,
this, "POST");
_root.showloop.gotoAndPlay(2);
}
Button 5上增加:
on(release){
loadVariables("show.htm?id=" add _root.id5,
this, "POST");
_root.showloop.gotoAndPlay(2);
}
Button 6上增加:
on(release){
loadVariables("show.htm?id=" add _root.id6,
this, "POST");
_root.showloop.gotoAndPlay(2);
}
Button 7上增加:
on(release){
loadVariables("show.htm?id=" add _root.id7,
this, "POST");
_root.showloop.gotoAndPlay(2);
}
这些Action无非就是向服务器端发送请求,启动循环,只是发送的参数不同而已。 |