Slides - A Sample Programm Created with Script2EXE
This sample demonstrates how to display a group of images as slides
Source Codes
<html>
<HEAD>
<TITLE>Slides - Sample Program Created With Script2EXE</TITLE>
<STYLE TYPE="TEXT/CSS">
body{margin:0}
</STYLE>
<script language=JavaScript>
if(window.external.SHW)
{
window.external.ResizeClientTo(235,352);
window.external.AllowResizeWindow(false);
window.external.AllowContextMenu(0);
}
var imgUrl=new Array();
var index=0;
imgUrl[0]="002.jpg";
imgUrl[1]="003.jpg";
imgUrl[2]="004.jpg";
imgUrl[3]="005.jpg";
imgUrl[4]="006.jpg";
imgUrl[5]="007.jpg";
function play()
{
pic.filters[0].play();
}
function next()
{
var n=imgUrl.length;
index++;
if(index<0 || index>=n)
index=0;
pic.filters[0].Transition=26;
pic.filters[0].apply();
pic.src=imgUrl[index];
play();
theTimer=setTimeout("next()", 3000);
}
function showMenu()
{
if(!window.external.SHW)
return;
if(window.event.button!=2)
return;
var menu=window.external.CreateMenu();
menu.AddItem("About...");
menu.AddItem("");
menu.AddItem("Exit");
var s=menu.Show();
if(!s)
return;
if(s=="Exit")
{
window.close();
return;
}
if(s=="About...")
{
var r=window.external.MessageBox("This program is created with Script2EXE by XUEBROTHERS.\r\n\r\nWould you like to visit the Web site of Script2EXE?", "yesno", "information", "Earth");
if(r=="yes")
window.external.ShellExecute("http://www.xuebrothers.net/sh/sh.htm");
return;
}
}
</script>
</HEAD>
<BODY scroll="no">
<img style="FILTER: progid:DXImageTransform.Microsoft.RevealTrans (duration=1,transition=2);; border-color:#000000;color:#000000;margin-bottom:0px" src="javascript:next()" name=pic onmousedown="showMenu()">
</BODY>
</HTML>