Comunidad de diseño web y desarrollo en internet online

Carga de XML en Flash

Citar            
MensajeEscrito el 29 Abr 2009 01:16 pm
Amigos del foros, tengo el siguiente problema, estoy trabajando un ejecutable (.exe) que va en un CD, el cual hace carga de swf externo, parte de esto es una Galeria, que muestra imagenes de varios productos, cuando cargo por ejemplo el producto 1, y quiero luego mostrar la galeria del producto 2, no me actualiza el xml con el cual esta configurada la galeria 2 y me sigue mostrando la galeria anterior, si cierro el ejecutable y lo vuelvo abrir y selecciono la galeria 2, me muestra la informacion correcta, pero si me cambio a la 1 me muestra la informacion de la 2, en donde noto que al momento de cargar la peli nueva no se carga o no se actualiza el xml donde esta toda la info de la galeria, como puedo solucionar esto de la manera mas sencilla? ojala puedan ayudarme.

Saludos

Hector

Por hperdomo

4 de clabLevel



 

firefox
Citar            
MensajeEscrito el 14 May 2009 11:53 pm
Se que han leido mi mensaje pero nadie me ha dado una luz......... :(
les doy un poco mas de información, esta galería están hechas con autoviewer, y este es el codigo que tiene unos de los archivos .as, que imagino es el que controla la carga de los xml:
:::::::::::::::::::::::::::::::::::::::::::::::::::::::
class com.airtightinteractive.apps.viewers.autoViewer.XMLManager
{
var mStageManager, xmlResults, mImageCount, aImageFileNames, aImageWidths, aImageHeights, aImageCaptions;
static var instance;
function XMLManager()
{
mStageManager = com.airtightinteractive.apps.viewers.autoViewer.StageManager.getInstance();
xmlResults = new XML();
xmlResults.ignoreWhite = true;
xmlResults.onLoad = mx.utils.Delegate.create(this, onXMLLoaded);
} // End of the function
static function getInstance()
{
if (com.airtightinteractive.apps.viewers.autoViewer.XMLManager.instance == null)
{
instance = new com.airtightinteractive.apps.viewers.autoViewer.XMLManager();
} // end if
return (com.airtightinteractive.apps.viewers.autoViewer.XMLManager.instance);
} // End of the function
function loadXML()
{
var _loc3 = com.airtightinteractive.apps.viewers.autoViewer.Options.XMLPath;
if (_root.xmlURL != undefined)
{
_loc3 = _root.xmlURL;
} // end if
xmlResults.load(_loc3);
} // End of the function
function onXMLLoaded(success)
{
mImageCount = 0;
aImageFileNames = [];
aImageWidths = [];
aImageHeights = [];
aImageCaptions = [];
if (success)
{
var _loc4 = xmlResults.firstChild;
mImageCount = Number(_loc4.childNodes.length);
var _loc7 = Number(_loc4.attributes.frameColor);
if (this.isValidNumber(_loc7))
{
frameColor = _loc7;
} // end if
var _loc8 = Number(_loc4.attributes.frameWidth);
if (this.isValidNumber(_loc8))
{
frameWidth = _loc8;
} // end if
var _loc6 = Number(_loc4.attributes.imagePadding);
if (this.isValidNumber(_loc6))
{
imagePadding = _loc6;
} // end if
var _loc5 = Number(_loc4.attributes.displayTime) * 1000;
if (this.isValidNumber(_loc5))
{
displayTime = _loc5;
} // end if
enableRightClickOpen = this.getBoolean(_loc4.attributes.enableRightClickOpen);
if (mImageCount < 1)
{
mStageManager.showNoImagesMessage();
}
else
{
for (var _loc3 = 0; _loc3 < mImageCount; ++_loc3)
{
var _loc2 = _loc4.childNodes[_loc3];
aImageFileNames.push(_loc2.childNodes[0].firstChild.nodeValue);
aImageCaptions.push(_loc2.childNodes[1].firstChild.nodeValue);
aImageWidths.push(Number(_loc2.childNodes[2].firstChild.nodeValue));
aImageHeights.push(Number(_loc2.childNodes[3].firstChild.nodeValue));
} // end of for
mStageManager.createImages();
} // end else if
}
else
{
mStageManager.showErrorMessage();
} // end else if
} // End of the function
function isValidNumber(x)
{
return (!(isNaN(x) || x == undefined));
} // End of the function
function getBoolean(s)
{
if (s.toLowerCase() == "true")
{
return (true);
} // end if
return (false);
} // End of the function
var frameColor = 16777215;
var frameWidth = 15;
var imagePadding = 20;
var displayTime = 6000;
var enableRightClickOpen = false;
} // End of Class

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

no se mucho de as, espero que alguien me pueda dar alguna pista de que debo hacer para solucionar el problema

Gracias

Por hperdomo

4 de clabLevel



 

firefox
Citar            
MensajeEscrito el 16 May 2009 02:00 am
Bueno, en el código siempre lee el xml de la raiz:

Código ActionScript :

_loc3 = _root.xmlURL;


Todo parece indicar que se están solapando variables, no se nada de del autoviewer, pero si puedes variar los archivos swf varía la propiedad de "lockroot" a "true" de estos.

Por elchininet

Claber

3921 de clabLevel

17 tutoriales

Genero:Masculino  

Front-end developer at Booking.com

firefox

 

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