/    Sign up×
Community /Pin to ProfileBookmark

Slideshow that fits in window

I have big images (1600*1200) and I want to use Java to show images in slideshow, but I don’t know how. I find some scripts to do that, but there is one problem I have to use scrollers to see full picture. Is there somek


———————————————————————

<script language=”JavaScript”>
<!– SlideShow by [email][email protected][/email] [url]http://website.lineone.net/~kurt.grigg/javascript[/url]

intro=new Image();
intro.src=’ntro.gif’; //The initial image here, shown once only!

pics=new Array(‘ap.gif’,’bp.gif’,’cp.gif’) //Put your images below – as many as needed!
speed=2000; //Slideshow speed – 1000 = 1 second etc!

//nothing needs altering below here.
load=new Array();
for(i=0; i < pics.length; i++)
{
load[i]=new Image();
load[i].src=pics[i];
}
ns=(document.layers);
n6=(document.getElementById&&!document.all);
ie=(document.all);
count=-1;
move=1;
chck=null;
timer=null;
vvv=’0′;
function Picnum(){
var d=(ns||ie)?’document.’:’document.getElementById(“‘;
var a=(ns||n6)?”:’all.’;
var n6r=(n6)?'”)’:”;
var p=eval(d+a+’Nums’+n6r);
if (ie||n6)
p.innerHTML=’Picture ‘+count;
if (ns){
p.document.write(“<div style=’position:absolute;top:0px;left:0px;font-family:Verdana;font-size:18px;color:#fffff0;text-align:center’>Picture “+count+”</div>”);
p.document.close();
}
}
function ManualForward(){
if (chck==1){
count+=move
if (count >= pics.length) count=0;
document.images.slides.src=pics[count];
Picnum();
}
}
function ManualReverse(){
if (chck==1){
count-=move
if (count < 0) count=pics.length-1;
document.images.slides.src=pics[count];
Picnum();
}
}
function Pause(){
chck=1;
count=count;
clearTimeout(timer)
Picnum();
}
function AutoCycle(){
count+=move
if (count >= pics.length) count=0;
document.images.slides.src=pics[count];
Picnum();
timer=setTimeout(‘AutoCycle()’,speed)
}
function Cycle(){
if (chck==1) AutoCycle();
chck=null;
}
//–>
</script>

<!– The table – Keep all images the same size to stop movement! –>
<center>
<table width=”250″ border=”0″ cellpadding=”0″ cellspacing=”4″>
<tr>
<td valign=”middle” align=”center” bgcolor=”#c0c0c0″>
<span class=”text” style=”position:relative”>Slide Show</span>
<br>
<span id=”Nums” class=”text” style=”position:relative”>&nbsp;</span>
</td>
</tr>
<tr>
<td height=”250″ valign=”middle” align=”center”>
<img src=”intro.gif” name=”slides”>
</td>
</tr>
<tr>
<td height=”40″ valign=”middle” align=”center” bgcolor=”#c0c0c0″>
<span id=”x”><span id=”y”><span id=”z”>
<a href=”javascript:ManualReverse()”> << </a>
<a href=”javascript?ause()”>Pause</a>
<a href=”javascript:ManualForward()”> >> </a>
<a href=”javascript:Cycle()”>Auto</a>
</span></span></span>
</td>
</tr>
</table>
</center>

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @kkk spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...