Ver Mensaje Individual
  #6 (permalink)  
Antiguo 29/07/2005, 03:46
Avatar de zocotoo
zocotoo
 
Fecha de Ingreso: febrero-2003
Mensajes: 74
Antigüedad: 21 años, 2 meses
Puntos: 0
Realmente buena la página de CristalLab.
Ya la conocía y me ha echado una mano muchas veces.

En cuanto, al gestor de contenidos lo he hecho mediante php sin flash.

Sin embargo, he intentado hacer la conexión swf+php+mysql y ahora te enseño el código para que si podéis me comentéis algo:

El php funciona correctamente:

Código PHP:
<?php
$connect 
mysql_connect("localhost""user""password");
            
mysql_select_db("bbdd"$connect);
            
$result mysql_query("SELECT title, comments, image FROM titles");
            
$cant 0;
            while(
$row=mysql_fetch_array($result)){
                echo 
"title$cant=$row[title]&comments$cant=$row[comments]&image$cant=$row[image]&";
                
$cant++;
            }
            echo 
"cant=$cant";
?>


El swf no funciona:

Código:
myData = new LoadVars();
myData.ref = this;
myData.load("anastasio.php");
myData.onLoad = function() {
	if (succes) {
		for (var i = 0; i<this.cant; i++) {
			this.ref["title"+i].text = this["title"+i];
			this.ref["comments"+i].text = this["comments"+i];
			this.ref["holder_mc"+i].loadMovie(this["Image"+i]);
		}
	} else {
		trace("Error loading data");
	}
};

Gracias, otra vez, por todo
__________________
Yip yop Dafunk!!