Comunidad de diseño web y desarrollo en internet online

Autoplay

Citar            
MensajeEscrito el 01 Mar 2007 04:08 pm
Hola, necesito ayuda en lo siguiente: Genere el exe de un fla y lo converti a protector de pantalla, lo que hace es presentar una serie de "diapositivas" con fotos e informacion, la cual puedes ver una por una utilizando botones de "siguiente" y "anterior", tambien tiene un boton "autoplay" el que hace que las diapositivas vayan cambiando una por una en determinados segundos, bueno, como el proyecto es un protector de pantalla pues lo que quiero es que al momento de abrirlo o ejecutarlo la funcion autoplay se active sin que yo de click al boton de "autoplay" pero que a la vez en el momento que yo quiera detenerme en alguna diapositiva pueda hacerlo. Alguien me puede ayudar?
Gracias.

Por FLAKA29

6 de clabLevel



Genero:Femenino  

msie7
Citar            
MensajeEscrito el 01 Mar 2007 04:27 pm
tengo un codigo que puede servir escribeme en 2 horas lo unico es que carga las imagenes atraves de xml

Por ariioo

81 de clabLevel



Genero:Masculino  

UN Pc

msie
Citar            
MensajeEscrito el 01 Mar 2007 06:53 pm
Gracias ariioo, tu ayuda seria de gran utilidad....
Solo necesitaria quitar lo de la carga de imagenes de xml no? y modificar de acuerdo a lo mio....

Por FLAKA29

6 de clabLevel



Genero:Femenino  

msie7
Citar            
MensajeEscrito el 01 Mar 2007 08:26 pm
no todo lo que hay que hacer en es activar la opcion html del protector de pantalla y listo

Por ariioo

81 de clabLevel



Genero:Masculino  

UN Pc

msie
Citar            
MensajeEscrito el 01 Mar 2007 08:37 pm
La primera vez me lo envaron por internet y le he venido dando unos cambios asi que no es mio yo lo he transformado y le he dado unos cambios, creo que es todo lo que necesitas

fscommand("allowscale", "false");
Stage.scaleMode = "noScale";

targetPhoto._visible = false;

slides_xml = new XML();
slides_xml.onLoad = loadSlideShow;
slides_xml.load("galeria/fotos.xml");
slides_xml.ignoreWhite = true;

function loadSlideShow(success) {
if (success == true) {
rootNode = slides_xml.firstChild;
totalSlides = rootNode.childNodes.length;
currentSlideNode = rootNode.firstChild;
photos = new Array(totalSlides);
thumbs = new Array(totalSlides);
captions = new Array(totalSlides);
tx = 30;
for (i=0; i < totalSlides; i++) { // populate arrays and create thumbnails dynamically
photos[i] = currentSlideNode.attributes.jpegURL;
thumbs[i] = [currentSlideNode.attributes.jpegWidth,currentSlideNode.attributes.jpegHeight];
captions[i] = currentSlideNode.firstChild.nodeValue;
_root.attachMovie("thumb","thumb"+i,i);
_root["thumb"+i]._x = tx;
_root["thumb"+i]._y = 118; // using fixed Y coord
_root["thumb"+i].tindex = i;
tx += 22;
currentSlideNode = currentSlideNode.nextSibling;
}

currentIndex = 0;
targetWidth=thumbs[currentIndex][0]; // get width
targetHeight=thumbs[currentIndex][1]; // get height;
updateSlide();
}
}

function updateSlide() {
targetPhoto.loadPhoto(photos[currentIndex]);
caption = captions[currentIndex];
statusField = (currentIndex+1) + "/" + totalSlides;
}

function slideShow() {
if (currentIndex == totalSlides-1) { currentIndex = 0; } else { currentIndex++; }
targetPhoto._visible = false;
targetWidth=thumbs[currentIndex][0];
targetHeight=thumbs[currentIndex][1];
updateSlide();

en el MC

onClipEvent (load) {
accel = 0.5;
rate = 0.1;
}

onClipEvent(enterFrame) {
w = w*accel+(_root.targetWidth-_width)*rate;
h = h*accel+(_root.targetHeight-_height)*rate;
_width += w;
_height += h;
if (Math.abs(_root.targetWidth-_width) < 1) { _width = _root.targetWidth; }
if (Math.abs(_root.targetHeight-_height) < 1) { _height = _root.targetHeight; }
if (_width == _root.targetWidth && _height == _root.targetHeight) {
_root.targetPhoto._x = _x-(_width/1.02);
_root.targetPhoto._y = _y-(_height/1.17);
_root.targetPhoto._visible = true;
}
}
}

MovieClip.prototype.loadPhoto = function(fn) {
this.createEmptyMovieClip("holder", 1);
this.holder.loadMovie(fn);
this.onEnterFrame = function() {
if (Math.floor((this.holder.getBytesLoaded()/this.holder.getBytesTotal())*100) >= 100) {
delete this.onEnterFrame;
}
}
}

Por ariioo

81 de clabLevel



Genero:Masculino  

UN Pc

msie
Citar            
MensajeEscrito el 27 Mar 2007 02:56 pm
Muchas Gracias......Si funciona :D

Por FLAKA29

6 de clabLevel



Genero:Femenino  

msie7
Citar            
MensajeEscrito el 27 Mar 2007 03:05 pm
Por favor, ariioo, leé las reglas del foro y usá las etiquetas [ code ] y [ /code ] (sin espacios)

Por HernanRivas

Claber

3416 de clabLevel

26 tutoriales

 

Argentina

msie
Citar            
MensajeEscrito el 28 Mar 2007 01:13 am
ok no lo olvidare, sobre las leyes ya las re-revise y no encuentro en que falle porfavor acepten mis excusas y comentenme que esta mal. Gracias
Gracias

Por ariioo

81 de clabLevel



Genero:Masculino  

UN Pc

msie

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.