Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/12/2009, 19:46
Avatar de AJVEvoluzione
AJVEvoluzione
 
Fecha de Ingreso: agosto-2004
Ubicación: Buenos Aires
Mensajes: 195
Antigüedad: 19 años, 8 meses
Puntos: 1
Exclamación Cómo poner solo los títulos ?

Estoy tratando de modificar un AS que encontre para poner noticias desde un XML con flash.
Lo que estoy buscando es que me ponga sólo el "titulo" (de cada noticia en el scroll de texto), ya que tiene un boton para poder verlas enteras, pero ya estuve viendolo y no pude, si alguien me da una mano

AS

Código PHP:
System.useCodepage true
var 
indice:Number
var 
noticias_xml:XML

function 
cargarDatos(_indice:Number){
        var 
fecha:String;
        var 
titulo:String;
        var 
mensaje:String;
        var 
imagen:String;
        
fecha noticias_xml.firstChild.childNodes[_indice].attributes.fecha;
        
titulo noticias_xml.firstChild.childNodes[_indice].firstChild.firstChild.nodeValue;
        
mensaje noticias_xml.firstChild.childNodes[_indice].firstChild.nextSibling.firstChild.nodeValue
        imagen 
noticias_xml.firstChild.childNodes[_indice].lastChild.firstChild.nodeValue
    ScrollBar
.setScrollTarget(mensaje_txt);
    
formStyleFormat             = new FStyleFormat;

        
formStyleFormat.scrollTrack "0xFFFFFF";
        
formStyleFormat.highlight   "0xFFFFFF";
        
formStyleFormat.highlight3D "0x6178EC";
        
formStyleFormat.arrow         "0x000099";
        
formStyleFormat.face         "0xAAAAAA";
        
formStyleFormat.background  "0x000000";
        
formStyleFormat.shadow        "0x6178EC";
        
formStyleFormat.darkshadow    "0x777777";
        
    
formStyleFormat.addListener(ScrollBar);
    
formStyleFormat.applyChanges();
        
_root.mensaje_txt.htmlText "";
        
_root.mensaje_txt.htmlText += "<p><font color='#33CC00' size='15'><b>" titulo "</b></font></p>";
        
_root.mensaje_txt.htmlText += "<p><font size='14'>" mensaje "</font>";
        
_root.mensaje_txt.htmlText += "<font color='#999999' size='12'>Publicado: " fecha "</font></p>";
        
_root.pantalla_mc.loadMovie(imagen);    
    }
    
indice=0;
noticias_xml = new XML();
noticias_xml.ignoreWhite true;
noticias_xml.load("noticias.xml");
noticias_xml.onLoad = function(){
            
cargarDatos(indice);            
    } 
XML

Código PHP:
<?xml version="1.0" encoding="iso-8859-1"?>
<noticias>
    <noticia fecha="02/12/2009"> 
        <titulo>Titulo 1</titulo>
        <mensaje>Noticia 1</mensaje>        
        <image>fotos/foto1.JPG</image>
    </noticia>
    <noticia fecha="02/12/2009"> 
        <titulo>Titulo 2</titulo>
        <mensaje>Noticia 2</mensaje>        
        <image>fotos/foto2.JPG</image>
    </noticia>
    <noticia fecha="02/12/2009"> 
        <titulo>Titulo 3</titulo>
        <mensaje>Noticia 3</mensaje>        
        <image>fotos/foto3.JPG</image>
    </noticia>
    <noticia fecha="02/12/2009"> 
        <titulo>Titulo 4</titulo>
        <mensaje>Noticia 4</mensaje>        
        <image>fotos/foto4.JPG</image>
    </noticia>
    <noticia fecha="02/12/2009"> 
        <titulo>Titulo 5</titulo>
        <mensaje>Noticia 5</mensaje>        
        <image>fotos/foto5.JPG</image>
    </noticia>
</noticias>

Última edición por AJVEvoluzione; 03/12/2009 a las 15:53