FUncionando el sistema escribe los locales ocupado pero escribe varias veces los locales que tienen varios puestos, si tuvieran idea de algun script praa que un nombre si se repite en la base de datos aparesca una sola vez ?
Código :
//
// movieclip.mover(posicion x, posicion y, velocidad);
//
MovieClip.prototype.mover = function( x, y, vel) {
this.onEnterFrame = function() {
this._x += (x-this._x)/vel;
this._y += (y-this._y)/vel;
};
};
///
btn_pa.onRelease = function() {
mapa.mover(118, 20, 4);
};
///
btn_pb.onRelease = function() {
mapa.mover(118, -330, 4);
};
function extraerseccion(seccion) {
myVar = new LoadVars();
myVar.load('http://www.zonadesistema.com/404/seccion.php?id='+seccion);
myVar.onLoad = function( success ){
if(success){
alto = 245.0;
nivel = 0;
x = 182.0;
x1 = 160.0;
lineas = 1;
for(this.a=1;this.a<=myVar.total;this.a++){
if (lineas <=8) {
createTextField(["Tienda_"+this.a],nivel,x,alto,110.2,30.3);
nivel = nivel+1;
//trace (nivel);
createTextField(["Area_"+this.a],nivel,x1,alto,30.2,17.3);
//trace(b);
trace(["Area_"+this.a]);
myformat = new TextFormat();
myformat.color = 0x000000;
myformat.size = 10;
myformat.font = "arial";
myformat.multiline = true;
myformat.bold = true;
myformat1 = new TextFormat;
myformat1.multiline = true;
myformat1.color = 0x000000;
myformat1.size = 10;
myformat1.bold = true;
myformat1.font = "arial";
_root["Tienda_"+this.a].text = myVar["tienda"+this.a];
_root["Tienda_"+this.a].setTextFormat(myformat);
_root["Area_"+this.a].text = myVar["area"+this.a];
_root["Area_"+this.a].setTextFormat(myformat1);
alto = alto + 15;
nivel = nivel + 1;
lineas = lineas + 1;
} else {
lineas = 1;
x = x + 145;
x1 = x1 + 145;
nivel = nivel + 1;
alto = 245.0;
}
}
} else {
trace("Error loading page");
}
}
}
function borrarseccion() {
for(this.a=1;this.a<=25;this.a++){
_root["Tienda_"+this.a].text = "";
_root["Area_"+this.a].text = "";
}
}
stop(); 