Comunidad de diseño web y desarrollo en internet online

Toltip con xml no carga

Citar            
MensajeEscrito el 25 Feb 2009 08:24 pm
Hola a todos he realizado un tooltip con xml

punos en flash pero los tooltips de los puntos estan en el xml me funciona de maravilla cuando lo cargo en el swf.

pero el swf que contiene a los punto le cargo dentro de un MC
el caul ejecuto y ya no e muestra el tooltip solo los puntos

pinto el tooltip del xml cuando paso el mouse por cada punto

Código :

myToolTip.show(obj_xml.firstChild.childNodes[this.index].firstChild.nodeValue);



con este boton llamo al swf que contiene los puntos es aqui que no me funciona el tootip

Código :


puntos.onRelease = function() {
   nocache = "?nocaching="+random(65000);
   close_zoom_area._visible = true
   precargador_mcl.loadClip("swf/area.swf"+nocache, caja_mc);
};



cuando lo llamaba asi de esta manera si me funcionaba

Código :

on (release)
{
   this.enabled = false;
    loadMovieNum("swf/area.swf", 2);
}


alguein sabe pr qeu me pasa esto por a favor ayuda ???

Por {as}

38 de clabLevel



 

firefox
Citar            
MensajeEscrito el 25 Feb 2009 11:28 pm
Hola, :P el problema sera cuando cargas el XML, como este es el problema del tooltip que ya habiamos resuelto, te reescribo el codigo:

Código ActionScript :

var obj_xml = new XML();
obj_xml.ignoreWhite = true;
obj_xml.load("../xml/area2.xml");

obj_xml.onLoad = function( ok:Boolean )
{
   if(ok)
   {      
      completar();
   }
   else texto = "Err.. U_U"
};

Function completar( Void ):Void
{
   texto = "Cargado... XML"
   for( var i:Number = 1; i <= 7; i++)
   {
      this["boton" + i ].index = i - 1;
      this["boton" + i ].onRollOver = function ( Void )
      {
         myToolTip.show(obj_xml.firstChild.childNodes[this.index].firstChild.nodeValue);
      };
      this["boton" + i ].onRollOut = function ( Void )
      {
         myToolTip.hide();
         myToolTip.resetColor();
         myToolTip.defaultSettings();
      };
   }
}

Por LongeVie

Claber

1741 de clabLevel

1 tutorial

Genero:Masculino  

En un lugar, re moto.

firefox
Citar            
MensajeEscrito el 26 Feb 2009 12:02 am
dime que te dan los trace?

Código ActionScript :

var obj_xml = new XML();
obj_xml.ignoreWhite = true;
obj_xml.load("../xml/area2.xml");

obj_xml.onLoad = function( ok:Boolean )
{
   if(ok)
   {      
      completar();
   }
   else texto = "Err.. U_U"
};

function completar( Void ):Void
{
   texto = "Cargado... XML"
   for( var i:Number = 1; i <= 7; i++)
   {
      this["boton" + i ].index = i - 1;
      trace(this["boton" + i ])
      this["boton" + i ].onRollOver = function ( Void )
      {
         trace(obj_xml.firstChild.childNodes[this.index].firstChild.nodeValue);
         trace(myToolTip);
         myToolTip.show(obj_xml.firstChild.childNodes[this.index].firstChild.nodeValue);
      };
      this["boton" + i ].onRollOut = function ( Void )
      {
         myToolTip.hide();
         myToolTip.resetColor();
         myToolTip.defaultSettings();
      };
   }
}

Por LongeVie

Claber

1741 de clabLevel

1 tutorial

Genero:Masculino  

En un lugar, re moto.

firefox
Citar            
MensajeEscrito el 26 Feb 2009 01:05 am
Bueno, este es punto en el que siempre encontramos errore, el problema era la ruta del XML.

Código ActionScript :

obj_xml.load("xml/area2.xml"); 


Las rutas XML y cualquier otra ruta, debe ser relativa al documento desde donde se embebe el primer swf, aunque llame a otros swf's todas las rutas debe ser relativas al html que carga todo, o en su defecto debe ser rutas absolutas.

Suerte a todos.

Por LongeVie

Claber

1741 de clabLevel

1 tutorial

Genero:Masculino  

En un lugar, re moto.

firefox

 

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