Código ActionScript :
//Create LoadVars object and load file
myData = new LoadVars()
//myData.load("anastasio.asp") //asp line
myData.load("archivo.php") //php line
myData.ref = this
//Fetch data
myData.onLoad = function(succes){
if(succes){
for(var i=0; i<this.cant; i++){
this.ref["Comments_txt"+i].text = this["Comments"+i]
this.ref["Title_txt"+i].text = this["Title"+i]
}
} else trace("Error loading data")
}
stop()
Y EL PHP:
Código PHP :
<?
$host="XXXXX";
$user="XXXXXX;
$word="XXXXXX";
$link = mssql_connect ($host, $user, $word) or die ("<center>No se puede conectar con la base de datos\n</center>\n");
mssql_select_db('BASE11111') or die("Imposible seleccionar la base de datos. Porfavor, intentelo mas tarde");
flush();
$consulta = "select top 10 cod_prod, descripcion_completa from productos";
$query = mssql_query($consulta);
$cant = 0;
while($row=mssql_fetch_array($query)){
echo "Title$cant=$row[cod_prod]&Comments$cant=$row[descripcion_completa]&";
$cant++;
}
echo "cant=$cant";
?>
ESTA CONSULTA ME REGRESA EL CODIGO DEL PRODUCTO Y LA DESCRIPCION A FLASH MEDIANTE UN TEXTO DINAMICO, con una instancia "Comments_txt1" y "Title_txt1" .
Mi duda es si aparte de esto puedo lograr que haga alguna otra accion como, ir a un frame, ir a alguna instancia.
o darle algun valor a un MC. como, si encuentras producto marcar SI = poner el MC azul , NO =se encuentra poner el MC rojo.
Disculpen por tanto texto pero en verdad por mas que busco no encuentro algo por el estilo, ando perdidon.
