is it possible to linkfor an eventListener to a var like:
var
myEventListener=broadcasterScope.addEventListener(eventName,updateVar)
and afterwards in a certain way removing the eventlistener with
"myEventLink" ?
I'd like to remove events that I set dynamically, do I really have to
store the scope, the event and the "doFunc"
to be able to remove it or could the return of the myEventListener be used?
Code involved:
var getInfo;
var removeLater=eventToVar(this,myEvent,E_Info,getInfo)
function
eventToVar(broadcasterScope,eventName:Object,eventVar:String,setToVar){
var theVar=setToVar;
var updateVar=function(event_obj){
theVar=event_obj[eventVar]
}
var
myEventListener=broadcasterScope.addEventListener(eventName,updateVar)
return myEventListener
}
thanks
_______________________________________________
Flashcoders@chattyfig.figleaf.com
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