Retroceder   Foros del Web > Programación para sitios web > Javascript > Frameworks

Respuesta
 
Herramientas Desplegado
Antiguo 27-mar-2008, 17:08   #1 (permalink)
riscking ha deshabilitado el karma
 
Fecha de Ingreso: marzo-2008
Mensajes: 10
Modificar Script Mooflow al hacer click y ejecute multibox

Muy buenas quiero modificar el script del Mooflow para que al hacer click ejecute el del multibox y esque no se como hacerlo, no tengo practicamente ni idea de javasclit, estoy aprendiendo php. El Mooflow es una glaria al estilo iphone q seguro a mas de uno le gusta ta muy chula.
EL script del Mooflow es este:

Código:
<script type="text/javascript">
var myMooFlowPage = {	
	start: function(){
		var mf = new MooFlow($('MooFlow'), {
			stylePath: 'MooFlow.css',
			interval: 3000,
			useSlider: true,
			useAutoPlay: true,
			useCaption: true,
			useResize: true,
			useWindowResize: true,
			useMouseWheel: true,
			useKeyInput: true,
			onClickView: function(image){
				myMooFlowPage.showMyImage(image);
			}
		});
		
		$$('.loadjson').addEvent('click', function(){
			mf.loadJSON(this.get('href'));
			return false;
		});

		$$('.loadremote').addEvent('click', function(){
			mf.remoteImg(this.get('href'), this.get('rel'));
			return false;
		});	
	},
	/* thats a simple demo you can add your own FullSizeViewer */
	showMyImage: function(imageObject){
		var image = imageObject['copy'];
		var coords = imageObject['coords'];
		var overlay = new Element('div',{
			'styles':{
				'position':'absolute',
				'top': 0,
				'left': 0,
				'z-index': 200000,
				'width': '100%',
				'height': '100%',
				'background-color': '#000',
				'opacity': '0.85'
			}
		}).inject(document.body,'bottom');
				
		var myViewer = new Element('div',{
			'styles':{
				'position':'absolute',
				'top': '0px',
				'left': '0px', 
				'z-index': 200001,
				'padding': '10px',
				'background-color': '#fff',
				'cursor': 'pointer'
			}
		}).inject(document.body,'bottom');
				
		image.inject(myViewer);
				
		var myProps = new Element('div',{
			'styles':{
				'color':'#000',
				'font-size': '11px'
			}
		});
		if(!Browser.Engine.trident){
			var html = '<h3>returned image > all attributes:</h3>';
			$A(image.attributes).each(function(att){
				html += ("<strong>"+att.name+"</strong>: "+att.value+"<br/>");
			});
			myProps.set('html', html);
		}
		myProps.appendText(JSON.encode(coords));
		myProps.inject(myViewer,'bottom');
				
		myViewer.addEvent('click', function(){
			overlay.dispose();
			this.dispose();
		});
		
		myViewer.setStyles({
			'left':window.getSize().x*0.5-myViewer.getSize().x*0.5,
			'top':-myViewer.getSize().y-10
		});
		var slideIn = new Fx.Tween(myViewer, 'top', {duration:1500, transition: Fx.Transitions.Back.easeOut});
		slideIn.start.delay(300, slideIn, window.getSize().y*0.5-myViewer.getSize().y*0.5);
	}
};

window.addEvent('domready', myMooFlowPage.start);
</script>
El codigo del Multibox
Código:
<script type="text/javascript">
			var box = {};
			window.addEvent('domready', function(){
				box = new MultiBox('mb', {descClassName: 'multiBoxDesc'});
			});
		</script>
Como no entiendo el codigo he borrao lo q muestra la imagen y los datos pero no consigo q funcione tan solo eso se queda sin mostrar nada, a ver alguien q entienda el codigo me dice si es posible.
Saludos
riscking está desconectado   Responder Citando
Antiguo 27-mar-2008, 18:29   #2 (permalink)
riscking ha deshabilitado el karma
 
Fecha de Ingreso: marzo-2008
Mensajes: 10
Re: Modificar Script Mooflow al hacer click y ejecute multibox

Vale creo q ya se donde esta el problema y es que no pueden convivir los dos mootools osea el mootools-beta-1.2b2.js y el mootools.js.

Alguna solucion posible o es imposible tener las dos juntas??
Un saludo
riscking está desconectado   Responder Citando
Respuesta
No hay votos aún.


Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
Caritas están Activado
[IMG] está Activado
Código HTML está Desactivado


La Zona horaria es GMT -6. Ahora son las 04:06.


Message Board Statistics

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93