Ver Mensaje Individual
  #3 (permalink)  
Antiguo 14/03/2010, 14:19
loponti
 
Fecha de Ingreso: febrero-2007
Ubicación: Mollerussa
Mensajes: 99
Antigüedad: 18 años
Puntos: 1
Respuesta: obtener vaiable de dentro funcion

perdona, Sí, me refiero a llamarla des de fuera de la función para poder usarla en otro MC.
Me explico. Dentro de un movieClip tengo el siguiente código
Cita:
function contactes() {
var num:Number = llista.firstChild.childNodes.length;
for (var i:Number = 0; i<num; i++) {
var novaEntrada:MovieClip = this.attachMovie("llista", "llista_"+(i), this.getNextHighestDepth());
novaEntrada._x = 10;
novaEntrada._y = 10;
novaEntrada._y += (novaEntrada._height+1)*i;
nou_nom = llista.firstChild.childNodes[i].attributes.nom;
nou_correu = llista.firstChild.childNodes[i].attributes.correu;
novaEntrada.nom.text = nou_nom;
novaEntrada.onRelease = function() {
boto = getProperty(this, _name);
fi_boto = boto.split("_");
posicio = fi_boto.slice(-1);
getURL("mailto:"+llista.firstChild.childNodes[posicio].attributes.correu, "_blank");
};
}
//aqui la variable que quiero llamar---------------------------
posicion = novaEntrada._y;
}
var llista:XML = new XML();
llista.ignoreWhite = true;
llista.load("contactes.xml");
llista.onLoad = function(correcte) {
if (correcte) {
contactes();
}
};
lo que realmente necesito es el valor de la variable "posicion" para usarlo fuera de este MC.

Supongo que ahora se entendera mejor. A veces por no alargarme me quedo corto en la pregunta.

Gracias