PDA

View Full Version : image slideshow


thickandthin
09-07-2002, 08:51 PM
does anyone know how to configure this script to adjust the image size- its a slideshow? Thanls in advance



<p align="center"><input type="button" name="btnPrev" value="&lt;&lt; Previous" onclick="Prev();"> <input type="button" name="bntPlay" value="Play - Stop" onclick="Play()"> <input type="button" name="btnNext" value=" Next &gt;&gt; " onclick="Next();"></p>

<p align="center"><img name="_Ath_Slide" onload="OnImgLoad()"> </p>

<p align="center"><b> <SPAN id="_Ath_FileName"></b> </SPAN> <br>
<b>Number of Pictures: <SPAN id="_Ath_Img_X"></b>2</SPAN> <strong>of</strong> <b><SPAN id="_Ath_Img_N"></b>4</SPAN> </p>

<p align="center"><script language="JavaScript1.2" event="onload"
for="window">
main();
</script>

<script language="JavaScript1.2">

/*
Interactive Image slideshow with text description
By Christian Carlessi Salvadó (cocolinks@c.net.gt)
For full source code to this script and more, visit http://dynamicdrive.com
*/


g_fPlayMode = 0;
g_iimg = 0;
g_imax = 0;
g_ImageTable = new Array();

function ChangeImage(fFwd)
{
if (fFwd)
{
if (++g_iimg==g_imax)
g_iimg=0;
}
else
{
if (g_iimg==0)
g_iimg=g_imax;
g_iimg--;
}
Update();
}

function Update(){
document.all._Ath_Slide.src = g_ImageTable[g_iimg][0];
document.all._Ath_FileName.innerHTML = g_ImageTable[g_iimg][1];
document.all._Ath_Img_X.innerHTML = g_iimg + 1;
document.all._Ath_Img_N.innerHTML = g_imax;
}


function Play()
{
g_fPlayMode = !g_fPlayMode;
if (g_fPlayMode)
{
btnPrev.disabled = btnNext.disabled = true;
Next();
}
else
{
btnPrev.disabled = btnNext.disabled = false;

}
}
function OnImgLoad()
{
if (g_fPlayMode)
window.setTimeout("Tick()", g_dwTimeOutSec*3000);
}
function Tick()
{
if (g_fPlayMode)
Next();
}
function Prev()
{
ChangeImage(false);
}
function Next()
{
ChangeImage(true);
}
function main()
{

Update();
}

////configure below variables/////////////////////////////
width=1






//configure the below images and description to your own.
g_ImageTable[g_imax++] = new Array
("http://electronicinteractive.netfirms.com/vice/notice/VCblimpandshark.jpg", "Pic 1:It's a Sharks gang? Kind of like the gang called the Sharks from The West Side Story huh?");

g_ImageTable[g_imax++] = new Array ("http://electronicinteractive.netfirms.com/vice/notice/VCbullet.jpg", "Pic 2:Is that a bullet hole in the back window there? Or is it a damage mark from the door on the left's window?");
g_ImageTable[g_imax++] = new Array ("http://electronicinteractive.netfirms.com/vice/notice/VCdog.jpg", "Pic 3:Oh no! Not the dog! Well, it looks like some kind of an animal, or it could be a person sitting, or something");
g_ImageTable[g_imax++] = new Array ("http://electronicinteractive.netfirms.com/vice/notice/8ball.jpg", "Pic 4:This pool is in the shape of an 8. Maybe the owner of the hotel is 8 Ball's father, Buddy?");
g_ImageTable[g_imax++] = new Array
("http://electronicinteractive.netfirms.com/vice/notice/golf.jpg", "Pic 5:There is a golf cart behind this sportscar. Nothing new. But it does mean Tommy is driving through a golf course.");
g_ImageTable[g_imax++] = new Array
("http://electronicinteractive.netfirms.com/vice/notice/kid.jpg", "Pic 6:If you look closely you will see a tall, dark figure walking next to and holding hands with a small figure wearing a blue dress. The tall, dark man looks like he is wearing a military uniform. And it looks like he is holding hands with his daughter! Yes, that's right, a child! :-/ Either that or it's a just a short person. But hey! The good news is that it shows that peds can walk in tandem!");
g_ImageTable[g_imax++] = new Array
("http://electronicinteractive.netfirms.com/vice/notice/bat.jpg", "Pic 7:Tommy is damaging a car with only a bat");
g_ImageTable[g_imax++] = new Array
("http://electronicinteractive.netfirms.com/vice/notice/taxi.jpg", "Pic 8:There is 3 or 4 peds inside the taxi! And 2 peds on the motorcycle! This means multiple peds in vehicles!!!");
g_ImageTable[g_imax++] = new Array
("http://electronicinteractive.netfirms.com/vice/notice/airport.jpg", "Pic 9:Not really much to go by, but I think I see an airport in this pic. It would make sense though, because the helicopter is flying away from it like it just took off from there. Plus I have a source who tells me there is an airport with docks along the coast, and this source told me things that were in the PSM article a week before it came out, so I believe him.");
g_ImageTable[g_imax++] = new Array
("http://electronicinteractive.netfirms.com/vice/notice/talk.jpg", "Pic 10:It looks like the peds are just talking, or the gang member? on the left is going to beat up the guy.");
g_ImageTable[g_imax++] = new Array
("http://electronicinteractive.netfirms.com/vice/notice/snipegang.jpg", "Pic 11:Notice the map, you'll see that the plain orange radar is gone, and a new more detailed radar is in. This one seems to show everything. I bet it shows height too. Also take note of the cash amount. Tommy has ONLY $1000!!!!! When the GI article said cash would play a more significant role in this game, they weren't kidding! Take a look at the picture on the guys chest. It looks like a spider or a crab. Could be a crab since it's Florida. Thanks to BrianDawg for pointing out the Hideout icon to me.");
g_ImageTable[g_imax++] = new Array
("http://electronicinteractive.netfirms.com/vice/notice/hondaproof.jpg", "Pic 12:The picture speaks for itself. The GPX is NOT a Delorean. It's a Honda CRX. Also, at the official website it says the GPX is an import, and the Delorean was a domestic vehicle.");
g_ImageTable[g_imax++] = new Array
("http://electronicinteractive.netfirms.com/boatshark.jpg", "Pic 13:Shark in water, jet trail, and blimp. Thanks to Jaguar for this pic.");
g_ImageTable[g_imax++] = new Array
("http://electronicinteractive.netfirms.com/vice/notice/busstop.jpg", "Pic 14:Here you can see what looks like another hooker. And there's a bus stop.");
g_ImageTable[g_imax++] = new Array
("http://electronicinteractive.netfirms.com/vice/notice/gasstation.jpg", "Pic 15:Look how there are actual prices for gas. GTA3 did not have prices. It is rumored that you can get gas in this game, because Rockstar said money plays a bigger value. But the gas has no value, it's just a novetly. See Rumors section for more on this.");
g_ImageTable[g_imax++] = new Array
("http://electronicinteractive.netfirms.com/hooker.jpg", "Pic 16:You probably already knew hookers were in the game. But here is a pic that confirms it. This was taken from the Freeway movie.");
g_ImageTable[g_imax++] = new Array
("http://electronicinteractive.netfirms.com/vice/notice/nailguns.jpg", "Pic 17:In this pic, FreakFXP discovered nailguns that you can buy at Screw This. Next it to them are some crowbars and chainsaws. Awesome!");

//extend the above list as desired
g_dwTimeOutSec=2

////End configuration/////////////////////////////



window.onload=Play

</script>

zoobie
09-08-2002, 02:29 AM
You can't without re-writing the whole script. I'm using the same script. This is why it's important to check before selecting a script to see if it does what you need. This one can use any sized images...and others have to be all the same. If I were you, I'd make the image size you want first...then load it into the viewer.

Vladdy
09-08-2002, 01:36 PM
I have a script with the same functionality but images can be different size.

thickandthin
09-08-2002, 07:26 PM
where do you get the script???

thickandthin
09-08-2002, 07:44 PM
if you want an to see what it looks like now go to Vice City Source (http://www.vcsource.tk) and click on Stange things! thanks!

zoobie
09-08-2002, 09:32 PM
The script you're using now can use any size image. You just need to get the image the size you want it to be first...then insert it into the viewer.