Foros del Web » Programando para Internet » PHP »

Flash xml y www en php

Estas en el tema de Flash xml y www en php en el foro de PHP en Foros del Web. Hola, tengo el siguiente problema que no se como resolver. Mirad en www.demakina.com Al final de la página hay un elemento flash xml que: si ...
  #1 (permalink)  
Antiguo 16/09/2010, 13:45
 
Fecha de Ingreso: septiembre-2010
Mensajes: 4
Antigüedad: 13 años, 7 meses
Puntos: 0
Flash xml y www en php

Hola, tengo el siguiente problema que no se como resolver.
Mirad en www.demakina.com
Al final de la página hay un elemento flash xml que:
si escribo en la barra de direcciones http://www.demakina.com no funcionan los enlaces de las imágenes.
si escribo en la barra de direcciones http://demakina.com/ si funcionan los enlaces.
¿alguien sabe a que se debe esto?
Muchas gracias y un saludo.
  #2 (permalink)  
Antiguo 18/09/2010, 19:58
Avatar de bng5  
Fecha de Ingreso: junio-2009
Ubicación: 127.0.0.1
Mensajes: 269
Antigüedad: 14 años, 11 meses
Puntos: 24
Respuesta: Flash xml y www en php

Esto es un problema exclusivamente de Flash, deberías haberlo puesto en el foro correspondiente.

Deberías obviar el dominio en las peticiones e inclusiones que hace esa película.
O sea en lugar de hacer una peticion a http://dominio.tld/lo_que_sea hacerlo a /lo_que_sea. De esta forma si la película se está visualizando con www hará las peticiones con www y si se accedió sin www hará las peticiones sin www.
  #3 (permalink)  
Antiguo 20/09/2010, 13:16
 
Fecha de Ingreso: septiembre-2010
Mensajes: 4
Antigüedad: 13 años, 7 meses
Puntos: 0
Respuesta: Flash xml y www en php

Hola, gracias por tu respuesta.
No sabía si era exclusivo de flash, porque los enlaces están en un archivo xml.
He hecho lo que me dices. He enlazado así:
/index.php?main_page=product_info&products_id=1157
en vez de como estaba originalmente:
http://demakina.com/index.php?main_page=product_info&products_id=1157
Pero no hay diferencia. Entrando http://www.demakina.com no enlazo, no obstante si lo hago entrando http://demakina.com
Gracias de nuevo y un saludo.
  #4 (permalink)  
Antiguo 20/09/2010, 13:22
Avatar de bng5  
Fecha de Ingreso: junio-2009
Ubicación: 127.0.0.1
Mensajes: 269
Antigüedad: 14 años, 11 meses
Puntos: 24
Respuesta: Flash xml y www en php

Me mataste, entonces no tengo ni idea. Espero que aparezca la solución.
  #5 (permalink)  
Antiguo 21/09/2010, 06:51
Avatar de monoswim
$moderador{'Esteban'}
 
Fecha de Ingreso: febrero-2002
Ubicación: Buenos Aires - Argentina
Mensajes: 8.762
Antigüedad: 22 años, 3 meses
Puntos: 90
Respuesta: Flash xml y www en php

Cita:
Entrando http://www.demakina.com no enlazo, no obstante si lo hago entrando http://demakina.com
En el navegador pasa lo mismo ? puede ser que esté mal configurado el servidor DNS que es el que hace funcionar el www para los dominios

__________________
Esteban Quintana
  #6 (permalink)  
Antiguo 21/09/2010, 12:48
 
Fecha de Ingreso: septiembre-2010
Mensajes: 4
Antigüedad: 13 años, 7 meses
Puntos: 0
Respuesta: Flash xml y www en php

Cita:
Iniciado por monoswim Ver Mensaje
En el navegador pasa lo mismo ? puede ser que esté mal configurado el servidor DNS que es el que hace funcionar el www para los dominios

Hola, pues si, he probado con diferentes navegadores y ocurre en todos.

Voy a detallarlo más.

la web es un gestor zencart. El archivo que contiene el index (define_main_page.php) lleva embebido el elemento flash así:

<td height="8" colspan="2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="515" height="160">
<param name="movie" value="/dockmenumx2011.swf" />
<param name="quality" value="high" />
<embed src="/dockmenumx2011.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="515" height="160"></embed>
</object></td>


Este archivo .swf lleva el siguiente código:

verticalMenu = false; //true for a vertical menu, false for horizontal
var minThumbW = 60; //onRollOut thumbs sizes (width
var minThumbH = 60; //and height)
// the minThumbW/minThumbH ratio should be equal to width/height ratio of the
// images you are indicating through the XML file
var maxThumbW = 150; //onRollOver size of the thumbs
var maxThumbH = minThumbH*maxThumbW/minThumbW;
var spacing = 6; //thumbs spacing
var influence = 100; //change the influence, snap and fade to have different feelings for onRollOver states
var snap = 8;
var fade = 12;
scrollSpeed = 15; //the dock scrolls with a certain speed
DockYpos = 5; //Y position of the Dock
DockXpos = 0; //X position of the Dock

bigThumbDirection = 2.2; // 2.2 middle, 1 up, 0 down - for horizontal orientation
//different values for vertical orientation

dockWidth = Stage.width;
dockHeight = Stage.height;




var xml:XML = new XML();
xml.ignoreWhite = true;

var images:Array = new Array();
var urls:Array = new Array();
var Dock:Array = new Array();

mirrorDistance=0;
useMirror = 1;
bigThumbDirection *= useMirror;

loadXML = function (success) {
if(success) {
var photos:Array = this.firstChild.childNodes;
total = photos.length-1;
createEmptyMovieClip("thumbs", 4);
for (var i=0;i<=total;i++) {
images.push(photos[i].attributes.image);
urls.push(photos[i].attributes.url);
thumb = thumbs.createEmptyMovieClip("th"+i, i);
myPic = thumb.createEmptyMovieClip("holder", 1);
myPic.loadMovie(images[i]);
if (useMirror==2) {
r = thumb.attachMovie("item","hold"+i, i+1000);
r.ref.inner.loadMovie(images[i]);
r._y = 2*thumb._height-1+mirrorDistance;
r._yscale=-100;
}
thumb.onClick(i);
Dock.push(thumb);
thumbs._y = DockYpos;
thumbs._x = DockXpos;
}
if (verticalMenu)
onEnterFrame = function () {
mouseOverDock = ((_ymouse >10) && (_ymouse<dockHeight-10) && (_xmouse>10) && (_xmouse<dockWidth-10));
if (thumbs._height > dockHeight) {
xpos = (dockHeight - thumbs._height-maxThumbH-spacing)*_ymouse/dockHeight;
if ((thumbs._y > xpos) && (Math.abs(thumbs._y - xpos)>(scrollSpeed+5))) thumbs._y -=scrollSpeed;
else if ((thumbs._y < xpos) && (Math.abs(thumbs._y - xpos)>(scrollSpeed+5))) thumbs._y += scrollSpeed;
else thumbs._y = xpos;
dist = maxThumbH/2;
}
else { dist = dockHeight/2 - thumbs._height/2+spacing/2; thumbs._y = 0;}
for (i=0;i<Dock.length;i++) {
H = Dock[i]._height;
W = Dock[i]._width;
if (thumbs._height > dockHeight)
rap = (influence-Math.abs(((thumbs._height+maxThumbH+spacing)/dockHeight)*_ymouse-Dock[i]._y-Dock[i]._height/2))/influence;
else rap = (influence-Math.abs(_ymouse-(Dock[i]._y+Dock[i]._height/2)))/influence;
Dock[i]._width = Math.max(W-((W-minThumbW)/fade), W-((W-(rap*mouseOverDock*maxThumbW))/snap));
Dock[i]._height = Math.max(H-((H-useMirror*minThumbH)/fade), H-((H-(useMirror*rap*mouseOverDock*maxThumbH))/snap));
Dock[i]._x = (maxThumbH-Dock[i]._height)/bigThumbDirection;
Dock[i]._y = dist;
dist += Dock[i]._height+spacing;
}
}
else
onEnterFrame = function () {
mouseOverDock = ((_ymouse >10) && (_ymouse<dockHeight-10) && (_xmouse>10) && (_xmouse<dockWidth-10));
if (thumbs._width > dockWidth) {
xpos = (dockWidth - thumbs._width-maxThumbW-spacing)*_xmouse/dockWidth;
if ((thumbs._x > xpos) && (Math.abs(thumbs._x - xpos)>(scrollSpeed+5))) thumbs._x -=scrollSpeed;
else if ((thumbs._x < xpos) && (Math.abs(thumbs._x - xpos)>(scrollSpeed+5))) thumbs._x += scrollSpeed;
else thumbs._x = xpos;
dist = maxThumbW/2;
}
else { dist = dockWidth/2 - thumbs._width/2+spacing/2; thumbs._x = 0;}
for (i=0;i<Dock.length;i++) {
H = Dock[i]._height;
W = Dock[i]._width;
if (thumbs._width > dockWidth)
rap = (influence-Math.abs(((thumbs._width+maxThumbW+spacing)/dockWidth)*_xmouse-Dock[i]._x-Dock[i]._width/2))/influence;
else rap = (influence-Math.abs(_xmouse-(Dock[i]._x+Dock[i]._width/2)))/influence;
Dock[i]._width = Math.max(W-((W-minThumbW)/fade), W-((W-(rap*mouseOverDock*maxThumbW))/snap));
Dock[i]._height = Math.max(H-((H-useMirror*minThumbH)/fade), H-((H-(useMirror*rap*mouseOverDock*maxThumbH))/snap));
Dock[i]._y = (maxThumbH-Dock[i]._height)/bigThumbDirection;
Dock[i]._x = dist;
dist += Dock[i]._width+spacing;
}
}
}
}

xml.onLoad = loadXML;
xml.load("/images9.xml");

MovieClip.prototype.onClick = function(i) {
this.onPress = function() {
getURL(urls[i], "_self");
}


}


he probado con enlaces absolutos y relativos en el archivo xml pero nada.


Como véis el .swf y el .xml están en la raiz del sitio.

Gracias.
  #7 (permalink)  
Antiguo 22/09/2010, 11:06
Avatar de monoswim
$moderador{'Esteban'}
 
Fecha de Ingreso: febrero-2002
Ubicación: Buenos Aires - Argentina
Mensajes: 8.762
Antigüedad: 22 años, 3 meses
Puntos: 90
Respuesta: Flash xml y www en php

me refiero a si en el navegador puedes entrar al sitio con y sin www como si fuera lo mismo...

de no ser así está mal configurado

__________________
Esteban Quintana
  #8 (permalink)  
Antiguo 22/09/2010, 12:29
 
Fecha de Ingreso: septiembre-2010
Mensajes: 4
Antigüedad: 13 años, 7 meses
Puntos: 0
Respuesta: Flash xml y www en php

Si, tecleando la url con www o sin las www en el navegador accedo sin problema. Además tengo otros elementos flash xml en la web que funcionan perfectamente.
El problema es cuando cuelgo un swf enlazado a un xml en el index
En las demás páginas no pasa

Etiquetas: www, xml
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:39.