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

link em script


oxi

Pergunta

pessoal não tenho muita noção de script nem do seu funcionamennto, a minha dúvida é a seguinte achei num site o script de um slideshow legal que pretendo utilizar em meu blog mas há um problema preciso que as imagens exibidas nele estejam com links que se abram em uma página em branco, mas nem tenho ideia se é possivel ou como fazer. abaixo segue o script.

<script>
<!--
/* 
SlideShow. Written by PerlScriptsJavaScripts.com
Copyright [url=http://www.perlscriptsjavascripts.com]http://www.perlscriptsjavascripts.com[/url] 
Free and commercial Perl and JavaScripts     
*/

// transition effect. number between 0 and 23, 23 is random effect
effect = 23; 

// transition duration. number of seconds effect lasts
duration = 1.5; 

// seconds to diaply each image?
display = 4;

// width of stage (first image)
oW = 400;

// height of stage
oH = 300;

// zoom width by (add or subtracts this many pixels from image width)
zW = 40;

// zoom height by 
zH = 30;

// path to image/name of image in slide show. this will also preload all images
// each element in the array must be in sequential order starting with zero (0)
SLIDES = new Array();

SLIDES[0]  = ["\images/js/04b.jpg", "Office"];
SLIDES[1]  = ["\images/js/06b.jpg", "Front left"];
SLIDES[2]  = ["\images/js/07b.jpg", "Back left"];
SLIDES[3]  = ["\images/js/08b.jpg", "Sign"];
SLIDES[4]  = ["\images/js/09b.jpg", "Front left close up"];
SLIDES[5]  = ["\images/js/10b.jpg", "Office color board"];
SLIDES[6]  = ["\images/js/11b.jpg", "Back right"];
SLIDES[7]  = ["\images/js/12b.jpg", "Back middle"]; => preciso que essas imagens se abram em outra pagina ou janela
// end required modifications

S = new Array();
for(a = 0; a < SLIDES.length; a++){
    S[a] = new Image(); S[a].src  = SLIDES[a][0];
}
// -->
</script>

</head>

<body>

<table align="center" bgcolor="#ffa000" border="0" cellpadding="3" cellspacing="0" style="border: white outset 2px;" width="400">
<form name="_slideShow">
<input type="Hidden" name="currSlide" value="0">
<input type="Hidden"name="delay">
<tr>
<td>
<table border="0" bgcolor="#fcf9e8" cellpadding="0" cellspacing="0" style="border: white inset 2px;" width="100%"><tr><td align="center">
<a href="java script:;" onclick="startSS()"><img src="images/js/toolplayB.gif" width="30" height="32" alt="" border="0"></a>
<a href="java script:;" onclick="stopSS()"><img src="images/js/toolstopB.gif" width="30" height="32" alt="" border="0"></a>
<img src="images/js/toolsep.gifB" width="5" height="32" alt="" border="0">
<a href="java script:;" onclick="prevSS()"><img src="images/js/toolprevb script:;" onclick="nextSS()"><img src="images/js/toolnextB.gif" width="30" height="32" alt="" border="0"></a>
<img src="images/js/toolsepB.gif" width="5" height="32" alt="" border="0">
<a href="java script:;" onclick="zoom(zW, zH)"><img src="images/js/toolinB.gif" width="30" height="32" alt="" border="0"></a>
<a href="java script:;" onclick="zoom(-zW, -zH)"><img src="images/js/tooloutB.gif" width="30" height="32" alt="" border="0"></a>
<img src="images/js/toolsepB.gif" width="5" height="32" alt="" border="0">
<a href="java script:;" onclick="zoom('')"><img src="images/js/toolresetB.gif" width="30" height="32" alt="" border="0"></a>
<select name="wichIm" style="width: 100%; font-size: 10px;" onchange="selected(this.options[this.selectedIndex].value)">
</select>
</td></tr></table>
</td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" style="border: white inset 2px;"><tr><td><img name="stage" border="0" src="\images/js/04b.jpg" style="filter: revealtrans(); font-size:12;"></td></tr></table>
</td>
</tr>
</form>
</table>

<script>
<!--

f = document._slideShow;
n = 0;
t = 0;

document.images["stage"].width  = oW;
document.images["stage"].height = oH;
f.delay.value = display;

// add image numbers to select menu
f.wichIm.options.length = 0;
for(i in SLIDES){
    f.wichIm.options[i] = new Option(SLIDES[i][1],i);
}

function startSS(){
    t = setTimeout("runSS(" + f.currSlide.value + ")", 1 * 1);
}

function runSS(n){
    n++;
    if(n >= SLIDES.length){
        n = 0;
    }
    document.images["stage"].src = S[n].src;
    if(document.all && navigator.userAgent.indexOf("Opera") < 0 && navigator.userAgent.indexOf("Windows") >= 0){
        document.images["stage"].style.visibility = "hidden";
        document.images["stage"].filters.item(0).apply();
        document.images["stage"].filters.item(0).transition = effect;
        document.images["stage"].style.visibility = "visible";
        document.images["stage"].filters(0).play(duration);
    }
    f.currSlide.value = n;
    f.wichIm[n].selected = true;
    t = setTimeout("runSS(" + f.currSlide.value + ")", f.delay.value * 1000);
}

function stopSS(){
    if(t){
        t = clearTimeout(t);
    }
}

function nextSS(){
    stopSS();
    n = f.currSlide.value;
    n++;
    if(n >= SLIDES.length){
        n = 0;
    }
    if(n < 0){
        n = SLIDES.length - 1;
    }
    document.images["stage"].src = S[n].src;
    f.currSlide.value = n;
    f.wichIm[n].selected = true;
    if(document.all && navigator.userAgent.indexOf("Opera") < 0 && navigator.userAgent.indexOf("Windows") >= 0){
        document.images["stage"].style.visibility = "hidden";
        document.images["stage"].filters.item(0).apply();
        document.images["stage"].filters.item(0).transition = effect;
        document.images["stage"].style.visibility = "visible";
        document.images["stage"].filters(0).play(duration);
    }
}

function prevSS(){
    stopSS();
    n = f.currSlide.value;
    n--;
    if(n >= SLIDES.length){
        n = 0;
    }
    if(n < 0){
        n = SLIDES.length - 1;
    }
    document.images["stage"].src = S[n].src;
    f.currSlide.value = n;
    f.wichIm[n].selected = true;
    
    if(document.all && navigator.userAgent.indexOf("Opera") < 0 && navigator.userAgent.indexOf("Windows") >= 0){
        document.images["stage"].style.visibility = "hidden";
        document.images["stage"].filters.item(0).apply();
        document.images["stage"].filters.item(0).transition = effect;
        document.images["stage"].style.visibility = "visible";
        document.images["stage"].filters(0).play(duration);
    }
}

function selected(n){
    stopSS();
    document.images["stage"].src = S[n].src;
    f.currSlide.value = n;
    
    if(document.all && navigator.userAgent.indexOf("Opera") < 0 && navigator.userAgent.indexOf("Windows") >= 0){
        document.images["stage"].style.visibility = "hidden";
        document.images["stage"].filters.item(0).apply();
        document.images["stage"].filters.item(0).transition = effect;
        document.images["stage"].style.visibility = "visible";
        document.images["stage"].filters(0).play(duration);
    }
}

function zoom(dim1, dim2){
    if(dim1){
        if(document.images["stage"].width < oW){
            document.images["stage"].width   = oW;
            document.images["stage"].height  = oH;
        } else {
            document.images["stage"].width  += dim1;
            document.images["stage"].height += dim2;
        }
        if(dim1 < 0){
            if(document.images["stage"].width < oW){
                document.images["stage"].width   = oW;
                document.images["stage"].height  = oH;
            }
        }
    } else {
        document.images["stage"].width   = oW;
        document.images["stage"].height  = oH;
    }
}
// -->
</script>

não sei se precisa-va postar todo o script mas na duvida!!!

aguardo comentarios e espero que possam me ajudar

Editado por andreia_sp
Adicionar tag"s
Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

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...