Ver Mensaje Individual
  #19 (permalink)  
Antiguo 28/09/2012, 07:41
jisrrael
 
Fecha de Ingreso: abril-2005
Mensajes: 16
Antigüedad: 19 años
Puntos: 1
Respuesta: Javascript para detener video en capas ocultas

Buenas tardes, mi problema es muy parecido pero la solución que leo no consigo implantarla.. os comento.
Cargo un video del youtube, este se abrirá en un lightbox:

<iframe type="text/html" width="400" height="397" src="http://www.youtube.com/embed/<?php echo $datos['Link_video']?>?rel=0&amp;wmode=transparent" frameborder="0"></iframe>

Pero cuando cierro el lightbox el video se queda en ejecucion... ;(

¿Como puedo hacer para que cuando le de cerrar a mi lightbox el video se detenga?.

El codigo javascript que controla el cierre de la ventana lightbox esta en el fichero moodalbox.js

// the overlay (clickable to close)
this.overlay = new Element('div').setProperty('id', 'mb_overlay').injectInside(document.body);
// the center element
this.center = new Element('div').setProperty('id', 'mb_center').setStyles({width: this.options.initialWidth+'px', height: this.options.initialHeight+'px', marginLeft: '-'+(this.options.initialWidth/2)+'px', display: 'none'}).injectInside(document.body);
// the actual page contents
this.contents = new Element('div').setProperty('id', 'mb_contents').injectInside(this.center);

// the bottom part (caption / close)
this.bottom = new Element('div').setProperty('id', 'mb_bottom').setStyle('display', 'none').injectInside(document.body);
this.closelink = new Element('a').setProperties({id: 'mb_close_link', href: '#'}).injectInside(this.bottom);
this.caption = new Element('div').setProperty('id', 'mb_caption').injectInside(this.bottom);
new Element('div').setStyle('clear', 'both').injectInside(this.bottom);

Cualquier ayuda se agradece y mucho !!!

Un saludo a todos los colaboradores !