Comunidad de diseño web y desarrollo en internet online

Agregar precargador a imagenes traidas desde xml

Citar            
MensajeEscrito el 23 Jun 2009 07:47 am
Consulta tengo el siguiente codigo en As y necesito agregar un precargador en los clips que traen las imagenes

_root.pantalla_mc.loadMovie(imagen0);
_root.pantalla_mc1.loadMovie(imagen1);


he intentado algunas cosas pero no tuve suerte alguien puede ayudarme muchas gracias.



System.useCodepage = true;
var indice:Number;
var noticias_xml:XML;


function cargarDatos(_indice:Number){

var titulo:String;
var mensaje:String;
var imagen0:String;
var imagen1:String;


titulo = noticias_xml.firstChild.childNodes[_indice].firstChild.firstChild.nodeValue;
mensaje = noticias_xml.firstChild.childNodes[_indice].firstChild.nextSibling.firstChild.nodeValue
imagen1 = noticias_xml.firstChild.childNodes[_indice].firstChild.nextSibling.nextSibling.firstChild.nodeValue
imagen0 = noticias_xml.firstChild.childNodes[_indice].lastChild.firstChild.nodeValue


_root.titulo_txt.loadMovie(titulo);
_root.mensaje_txt.htmlText = mensaje;

_root.pantalla_mc.loadMovie(imagen0);
_root.pantalla_mc1.loadMovie(imagen1);

}




indice=0;

noticias_xml = new XML();
noticias_xml.ignoreWhite = true;
noticias_xml.load("noticias.xml);
noticias_xml.onLoad = function(){

cargarDatos(indice);

}

Por Vandit

3 de clabLevel



 

firefox
Citar            
MensajeEscrito el 23 Jun 2009 11:11 pm
Cuando vayas a postar códigos de ActionScript hazlo con los tags correspondientes:

Código :

[as]
Códigos en AS
[/as]


Para lo que deseas hacer te recomeindo MovieClipLoader.

Por elchininet

Claber

3921 de clabLevel

17 tutoriales

Genero:Masculino  

Front-end developer at Booking.com

firefox
Citar            
MensajeEscrito el 24 Jun 2009 04:03 am
No me di cuenta de poster con la estiquetas. Para lo proxima lo tendre en cuenta. Voy a ver como me con le tuto que me pasaste. Muchas Gracias!

Por Vandit

3 de clabLevel



 

firefox

 

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