Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/05/2003, 15:05
Avatar de affv
affv
 
Fecha de Ingreso: diciembre-2002
Ubicación: Ahora aqui
Mensajes: 485
Antigüedad: 22 años, 4 meses
Puntos: 0
Script incompleto

OK. Primero que nada buen dia

segundo vean esta direccion para que vean lo que quiero hacer con el codigo y si hay alguna otra forma de hacerlo. AQUI

tres el codigo que utilizo es este
<html>

<head>
<title>Banners</title>
</head>

<body topmargin="0" leftmargin="0" bgcolor="#000000">
<script language="JavaScript" SRC="http://www.aquenosabias.com/pruebas/js.js"></script>
<script language="JavaScript">
var timer;
var current_location = 1;
var next_location = 1;
var pics_loaded = 0;
var onoff = 1;
var direction = 1;
var timeout_value;
var images = new Array;
var photo_urls = new Array;
var photo_captions = new Array;
var transitionNames = new Array;
var transitions = new Array;
var current_transition = 0;
var loop = 1;
photo_urls[1] = "mostrar/0001.jpg";
photo_captions[1] = "";
photo_urls[2] = "mostrar/0002.jpg";
photo_captions[2] = "";
photo_urls[3] = "mostrar/0003.jpg";
photo_captions[3] = "";
transitions[0] = "progid:DXImageTransform.Microsoft.Slide(Duration= 1,slideStyle=push)";
var transition_count = 0;
var photo_count = 3;

if (is_ie4up || is_nav6up) {
} else {
document.location = slideShowLow;
}

var browserCanBlend = (is_ie5_5up);

function changeElementText(id, newText) {
element = document.getElementById(id);
element.innerHTML = newText;
}

function play() {
go_to_next_photo();
}

function preload_complete() {
}

function reset_timer() {
clearTimeout(timer);
if (onoff) {
timeout_value = 5000;
timer = setTimeout('go_to_next_photo()', timeout_value);
}
}

function wait_for_current_photo() {
if (!show_current_photo()) {
clearTimeout(timer);
timer = setTimeout('wait_for_current_photo()', 500);
return 0;
} else {
preload_next_photo();
reset_timer();
}
}

function go_to_next_photo() {
current_location = next_location;
if (!show_current_photo()) {
wait_for_current_photo();
return 0;
}
preload_next_photo();
reset_timer();
}

function preload_next_photo() {
next_location = (parseInt(current_location) + parseInt(direction));
if (next_location > photo_count) {
next_location = 1;
if (!loop) {
stop();
}
}
if (next_location == 0) {
next_location = photo_count;
if (!loop) {
stop();
}
}
preload_photo(next_location);
}

function show_current_photo() {
if (!images[current_location] || !images[current_location].complete) {
preload_photo(current_location);
return 0;
}
if (browserCanBlend){
var do_transition;
if (current_transition == (transition_count)) {
do_transition = Math.floor(Math.random() * transition_count);
} else {
do_transition = current_transition;
}
document.images.slide.style.filter=transitions[do_transition];
document.images.slide.filters[0].Apply();
}
document.slide.src = images[current_location].src;
setCaption(photo_captions[current_location]);
if (browserCanBlend) {
document.images.slide.filters[0].Play();
}
return 1;
}

function preload_photo(index) {
if (pics_loaded < photo_count) {
if (!images[index]) {
images[index] = new Image;
images[index].onLoad = preload_complete();
images[index].src = photo_urls[index];
pics_loaded++;
}
}
}

function setCaption(text) {
}
</Script>

<form name="TopForm">
<p style="margin-top: 0; margin-bottom: 0">
<script language="JavaScript">
document.write("<td><img border=0 src="+photo_urls[1]+" name=slide></td></p>");
play();
</script>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="230" id="AutoNumber1">
<tr>
<td width="115">
<p align="left"><b><font size="1" color="#FFFFFF" onClick='changeDirection(-1)' style="cursor: hand;" face="Arial">Anterior</font></b></td>
<td width="115">
<p align="right"><b><font size="1" color="#FFFFFF" onClick='changeDirection(1)' style="cursor: hand;" face="Arial">Siguiente</font></b></td>
</tr>
</table>
</form>

</body>

</html>

Como podria hacer para mejorar el codigo, este lo saque de un slideshow y como no tengo mucho conocimiento sobre JavaScript entonces pido de su ayuda para mejorarle lo que se pueda

Muchas Gracias por su tiempo

No hay alguien que me pueda ayudar???
__________________
Todo tiene un comienzo y un fin!!
Postea tus proyectos

Última edición por affv; 28/05/2003 a las 15:05