Comunidad de diseño web y desarrollo en internet online

XML en diferentes carpetas

Citar            
MensajeEscrito el 22 Jul 2007 02:29 am
Hola gente:
Estoy desesperado.... Necesito ayuda con lo siguiente.
Estoy implementando un sitio completo con PHP, MySQL, exportacion en XML y flash.
La cosa es q necesito direccionar el xml, ya que el sitio es de una empresa de diseño y cada uno de los trabajos.
Ejemplo:
Hay una carpeta que se llama trabajos, entonces dentro de esa carpeta estan todos los trabajos.
En la carpeta trabajo tengo un swf que llama a:
myXML.load('./ultimostrabajos.xml');
Aca esta el listado de todos los trabajos, con el nombre de las subcarpetas de los trabajos.

Adentro del trabajo hay un swf que levanta lo siguiente:
myXML.load('nav.xml');

Pero lo levanta de cualquier lado.

La pregunta es la siguiente. Como puedo decirle a myXML.load('nav.xml'); que lo levante de esa carpeta porq no tengo forma.

Espero que se entienda.
Saludos y gracias al que ayude.
Gabriel :crap:

Por gabrielitus

1 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 22 Jul 2007 08:54 am
¿cómo? no entendí nada

Por _CONEJO

BOFH

7639 de clabLevel

17 tutoriales
21 articulos

 

firefox
Citar            
MensajeEscrito el 22 Jul 2007 02:33 pm
te sintetizo:
Necesito especificarle la carpeta a esta seccion de codigo, pero por cada carpeta(que son diferentes).
Ejemplo:
myXML.load('cliente01/nav.xml');
myXML.load('cliente02/nav.xml');
myXML.load('cliente03/nav.xml');
myXML.load('cliente04/nav.xml');
myXML.load('cliente05/nav.xml');

(no anda asi como te lo puse).

Saludos y gracias

Por gabrielitus

1 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 22 Jul 2007 03:38 pm
Puedes poner un árbol de los xml y de donde está el SWF?
Sigo sin ver dónde está el problema.

Por _CONEJO

BOFH

7639 de clabLevel

17 tutoriales
21 articulos

 

firefox
Citar            
MensajeEscrito el 23 Jul 2007 05:32 am
Te paso la estructura del swf q levanta el xml:
this._lockroot = true;
var targY_:Array = new Array ();
var total:Number = 0;
var pos_ini:Number = 0;
myXML = new XML ();
myXML.ignoreWhite = true;
myXML.onLoad = function (ok) {
if (ok) {
//trace('data loaded');
//trace(this.firstChild.firstChild)
allGalleryData= this.firstChild.childNodes;
for (i = 0; i <allGalleryData.length;i++){
//trace(allData[i].attributes.text);
newBut=_root.attachMovie('butTemp','but'+i,i)
newBut._y=50;
newBut._x=(i*90);
newBut.but_txt.text=allGalleryData[i].attributes.text
newBut.myHeading=allGalleryData[i].firstChild.firstChild
newBut.myContent=allGalleryData[i].firstChild.nextSibling.firstChild
newBut.myImage=allGalleryData[i].firstChild.nextSibling.nextSibling.firstChild
newBut.onRelease=function(){
heading_txt.text=this.myHeading;
content_txt.text=this.myContent;
if (this.myImage) {
_root.image_mc.loadMovie(this.myImage);
}
};

}
} else {
trace('error');
}
};
myXML.load('nav.xml');


Y aca va el XML nav.xml

<?xml version="1.0" encoding="utf-8"?>
<nav>
<but text=" Il progetto -">
<heading>Emil Banca</heading>
<content>sdfsdfdf</content>
<image></image>
</but>

<but text=" Gli objettivi -">
<heading>Emil Banca</heading>
<content>sdfsfdfdf</content>
<image></image>
</but>

<but text=" I pubblici -">
<heading>Emil Banca</heading>
<content>Isdfsdfsdf</content>
<image></image>
</but>

<but text=" Il messaggio -">
<heading>Emil Banca</heading>
<content>sdfdsdf</content>
<image></image>
</but>

<but text=" Il format -">
<heading>Emil Banca</heading>
<content>sdfdsf</content>
<image></image>
</but>

<but text=" I canali -">
<heading>Emil Banca</heading>
<content>sdfsdfdsf/content>
<image></image>
</but>

<but text="Gli strumenti-">
<heading>Emil Banca</heading>
<content>dfsdfsdf </content>
<image></image>
</but>

<but text=" La realizzazione">
<heading>Emil Banca</heading>
<content>ll’amicizia e della cooperazione”. La visualizzazione del testimonial è stata affidata a Luca Salvagno (autore di fumetti professionista). Ori, in vari atteggiamenti ed espressioni, è stato utilizzato in tutti gli strumenti realizzati.</content>
<image>img1.png</image>
</but>

</nav>

Cualquier cosa me decis y te paso al mail los .fla.
Saludos y gracias

Por gabrielitus

1 de clabLevel



Genero:Masculino  

firefox

 

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