He cogido el noticiero de cristalab y he estado adaptandole un panel de gestion, de forma que con php, cargo los datos de la base de datos, y los formateo de manera que flash lo entienda...
La cosa es que los enlaces no me los coje...
Como podría aserlo?? os paso el codigo....
AS2
Código :
Obj2 = new LoadVars(); Obj2.load("noticias/noticiasflash.php"); myTexto2.htmlText = "Cargando..."; Obj2.onLoad = function() { titulo = Obj2.titulo.split("@@@"); descripcion = Obj2.descripcion.split("@@@"); fuente= Obj2.fuente.split("@@@"); separador = "----------------------------------------------------------"; myTexto2.htmlText = ""; for (var i = 0; i<titulo.length; i++) { myTexto2.htmlText +="<b>"+"<u>"+titulo[i]+"</u></b><br>"+descripcion[i]+"<br><br>"+"<i>"+"Descarga: "+"<a href=\"asfunction:linkFuenteNoticias,noticias/ficheros/"+fuente[i]+"\">"+"<u>"+fuente[i]+"</a></i></u>"+"<br>"+separador; } }; ////////////////////////// AS FUNCTION /////////////////////////////////////////////////////////////////////////////// function LinkFuenteNoticias(cual) { getURL(cual, "_blank"); }
PHP
Código :
<? echo '&titulo='; /* ------------------------------------------ */ while($row = mysql_fetch_array($sql)) { if($row['id']<3){ $plus= '.@@@.'; } else { $plus='.&'; } $titu= $row['titulo'].$plus; echo $titu; } /* ------------------------------------------ */ echo '<br>&descripcion='; while($row = mysql_fetch_array($sql2)) { if($row['id']<3){ $plus= '.@@@.'; } else { $plus='.&'; } $conte= $row['contenido'].$plus; echo $conte; } /* ------------------------------------------ */ echo '<br>&fuente='; while($row = mysql_fetch_array($sql3)) { if($row['id']<3){ $plus= '@@@'; } else { $plus='&'; } $fuente= $row['descarga'].$plus; echo $fuente; } ?>
Salida de PHP
Código :
&titulo=ALTA TENSIÓN.& &descripcion=Curatór: Andrés, Isaac, Santana. 28 de enero de 2009. Galería Fernando Pradilla. C/ Claudio Coello, 20. Madrid.& &fuente=Cuadriptico.pdf&
Como puedo hacer para que enlace con el fichero?? he conseuido que me muestre el nombre del fichero pero el enlace parece estar como desactivado.
A ve si alguien me puede ayudar Saludos!!!!!