Ir para conteúdo
Fórum Script Brasil
  • 0

Como Fazer Este Script


AMDeus

Pergunta

Há como fazer este script de slide de imagens exibir 6 imagens diferentes sem repitir?

é o seguite:

Tenho uma tabela com 6 colunas.

ela será aleatória, ou seja, ficará exibindo imagens.

este script muda a imagem na sequência que eu escolher, bem exemplificado abaixo.

Só que é mais de uma imagem, e em javscript eu faço a mínima idéia:

este é o código da tabela

<body onload=runSlideShow()>

<table border="0" cellpadding="0" cellspacing="0" width="453" id="table6" height="47">
<tr>
<td width="75">
<img src=001.jpg name=PictureBox width=73 height=50></td>
<td width="75">&nbsp;</td>
<td width="76">&nbsp;</td>
<td width="76">&nbsp;</td>
<td width="76">&nbsp;</td>
<td width="75">&nbsp;</td>
</tr>
</table>
</body>
este é o script
<script>

// (C) 2002 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header.

// ==============================
// Set the following variables...
// ==============================

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 3000;

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;

var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this

// ESPECIFIQUE SUAS IMAGENS NOS NOMES ABAIXO
// Specify the image files...
// To add more images, just continue
// the pattern, adding to the array below.
// To use fewer images, remove lines
// starting at the end of the Picture array.
// Caution: The number of Pictures *must*
// equal the number of Captions!

Picture[1]  = '001.jpg';
Picture[2]  = '002.jpg';
Picture[3]  = '003.jpg';
Picture[4]  = '004.jpg';
Picture[5]  = '005.jpg';


// ESPECIFIQUE A LEGENDA DE CADA IMAGEM
// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!

Caption[1]  = "This is the first caption.";
Caption[2]  = "This is the second caption.";
Caption[3]  = "This is the third caption.";
Caption[4]  = "This is the fourth caption.";
Caption[5]  = "This is the fifth caption.";


// =====================================
// Do not edit anything below this line!
// =====================================

var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}

function runSlideShow(){
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
jss = jss + 1;
if (jss > (pss)) jss=1;
tss = setTimeout('runSlideShow()', SlideShowSpeed);
}
</script>

e estas são as legendas:

<td id=CaptionBox align=center bgcolor=#fedcba>

This is the default caption.

</td>

agora é exibir as imagens na tabela de forma que elas não repitam! tem como?

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      651,9k
×
×
  • Criar Novo...