<?xml version="1.0" encoding="utf-8"?>
<Module>
<ModulePrefs title="Sample" author_email="
[email protected]">
</ModulePrefs>
<Content type="html"><![CDATA[
<script type="text/javascript">
gadgets.util.registerOnLoadHandler(changeImage);
var count = 1;
var imageURL = ["0.jpg","1.jpg","2.jpg","3.jpg","4.jpg"];
var baseURL = "http://www.openspc2.org/reibun/OpenSocial/gadget/photo/";
// 画像を切り替える関数
function changeImage(){
var filename = baseURL+imageURL[count];
document.getElementById("myPhoto").src = filename;
count++;
count = count % imageURL.length;
setTimeout("changeImage()", 2000);
}
</script>
<img src="photo/0.jpg" id="myPhoto"></div>
]]></Content>
</Module>