在Blogger加入自動播放的下拉選單Picasa網路相簿
<script>
var flashstring='<embed pluginspage="http://www.macromedia.com/go/getflashplayer" width="288" src="http://picasaweb.google.com/s/c/bin/slideshow.swf" height="192" flashvars="host=picasaweb.google.com&captions=1&RGB=0x000000&feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2F你的Google帳號放這%2Falbumid%2F##ALBUMID##%3Fkind%3Dphoto%26alt%3Drss" type="application/x-shockwave-flash"></embed>';

function writeflash(albumid){
flashstring1=flashstring.replace("##ALBUMID##",albumid);
document.getElementById("picasaweb").innerHTML=flashstring1;
}

function listallalbum(json) {
var firstlink='';
var temp = '<select onchange="writeflash(this.options[this.selectedIndex].value)">';
var sortentry=json.feed.entry;
for (var i=0, post; post = sortentry[i]; i++) {
var title = post.title.$t;

var link = post.link[2].href.replace(/(^.*albumid\/)(.*)(\?.*$)/g,"$2");
if(i==0){
firstlink=link;
}
temp += '<option value="'+link+'">'+title +'</option>';
}
temp+="</select>";
document.writeln(temp);
writeflash(firstlink);
}
</script>

<script src="http://picasaweb.google.com/data/feed/base/user/你的Google帳號放這?kind=album&hl=en_US&access=public&alt=json&callback=listallalbum"></script>

<div id="picasaweb">
<embed pluginspage="http://www.macromedia.com/go/getflashplayer" width="288" src="http://picasaweb.google.com/s/c/bin/slideshow.swf" height="192" flashvars="host=picasaweb.google.com&captions=1&RGB=0x000000&feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2F你的Google帳號放這%2Falbumid%2F你的預設相簿ID放這%3Fkind%3Dphoto%26alt%3Drss" type="application/x-shockwave-flash"></embed></div>

c8cc168 發表在 痞客邦 留言(0) 人氣()