Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/07/2005, 09:30
spike777
 
Fecha de Ingreso: marzo-2004
Ubicación: Buenos Aires - Argentina
Mensajes: 56
Antigüedad: 20 años, 1 mes
Puntos: 0
HELP! Problema con AMFPHP

Buenas,

Ante todo quiero agradecer a Tmeister ya que gracias a su sitio encontre mucha info sobre el AMFPHP.
Estoy haciendo un sitio en flash, que mediante una consulta en una base MySQL (mediante PHP) tiene que mostrar una determinada cantidad de botones (dependiendo de cuantos registros haya) y al presionar cada boton debera mostrar en un movieclip una imagen determinada. Los botones me los duplica bien, el problema es que presione el boton que presione siempre me muestra la misma foto y el mismo titulo (el ultimo registro de la consulta), hay algo que debo estar haciendo mal. En la base de datos esta la direccion de cada jpg (por ejemplo img/20.jpg)

Les paso el codigo que tengo en Flash:

p._visible = false;
basey = 0;
import mx.remoting.Service;
import mx.rpc.FaultEvent;
import mx.remoting.PendingCall;
import mx.rpc.ResultEvent;
import mx.rpc.RelayResponder;
var urlGateway:String = "http://www.espak.com.ar/amfphp/gateway.php";
var services:String = "resultset";
var myService:Service = new Service(urlGateway, null, services, null, null);
var calling:PendingCall = myService.getData();
calling.responder = new RelayResponder(this, "getData_Result");
function getData_Result(obj:ResultEvent) {
rows = obj.result._items;
x = 0;
for (var info in rows) {

tit=rows[x].titulo;
picture=rows[x].foto;

clip = this.p.duplicateMovieClip("p"+x, x+10);
clip._y = basey;
clip.onPress = function() {
_root.titulo=tit;
loadMovie(picture,"_root.foto");
};
basey += 30;

x = x+1;
}
}


Desde ya muchas gracias !