Ver Mensaje Individual
  #4 (permalink)  
Antiguo 03/12/2011, 11:25
Avatar de ocesitaro
ocesitaro
 
Fecha de Ingreso: diciembre-2011
Ubicación: Carabayllo
Mensajes: 274
Antigüedad: 12 años, 5 meses
Puntos: 36
Respuesta: Flash as3, efecto fade y carga de swf

boton.removeEventListener(MouseEvent.CLICK, func)

func no es una funcion sino un string

lo que puedes hace es usa un callback
adjunto un script de una clase callBack que encontré por ahi.

package{

public class Callback{

// Create a wrapper for a callback function.
// Tacks the additional args on to any args normally passed to the
// callback.
public static function create(handler:Function,...args):Function{

return function(...innerArgs):void{
handler.apply(this,innerArgs.concat(args));
}

}
}
}

luego importas:

import callback

boton_btn.addEventListener(MouseEvent.CLICK,Callba ck.create(miFuncion,parametro1));

function miFuncion(e:MouseEvent,param:String){
algo
}