Hi there, I have a problem. This class doesn't work correctly.
When I create an Object, all it's property's values become undefined even if I
Insert Items trough the "Nueva_Ruta" method. When I Call the "SHOW ALL" method
for tracing , all Array items are empty/undefined.
I really need help about it.
I don't understand this behavior. I'm Using Flash Develop.
Thanks a lot.
//--------------------------CLASS ------------------------------
class Ruta
{
//-----
private var cantidad:Number;
private var ruta:Array;
private var nombre_ruta:Array;
//-----CONSTRUCTOR
public function Ruta() {
cantidad = 0;
}
//--------- INSERT METHOD
public function Nueva_Ruta(nombre:String, pruta:String):Void{
ruta.push(pruta);
nombre_ruta.push(nombre);
cantidad++;
}
//---------- SHOW ALL
public function Todas_las_Rutas():Array {
var nombres_rutas:Array = new Array;
for(var i:Number = 0; i < cantidad ; i++){
nombres_rutas[i] = nombre_ruta[i] + " (" + ruta[i] + ")";
}
return nombres_rutas;
}
}
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com