oldarney
February 12th, 2008, 10:26 PM
all i ask is for a class's function to tell an event listener's event object a variable name. whats the simplest way of doing that. my head is blowing from reading these complex guides. i avoided classes at all cost until yesterday, witch my application finally got so hard to control that classes seemed like the answer.
help would be appreciated.
to make it a bit more clear here's what i want (in graphics)
[MyClass]
dispatchEvent(this.name)...
[EventDispatcher]
function?(thevarname:String){
return thevarname:
}
[BackInMyApp.fla]
var comitsuicide:MyClass = new MyClass;
comitsuicide.addEventListener(PullTrigger.Gun, hang)
function hang(evt:TheVarNameiIsHere){
haleluya = ''or not"
doSomethingWitTheVar = TheVarNameiIsHere*10/5*(cos(90));
}
help would be appreciated.
to make it a bit more clear here's what i want (in graphics)
[MyClass]
dispatchEvent(this.name)...
[EventDispatcher]
function?(thevarname:String){
return thevarname:
}
[BackInMyApp.fla]
var comitsuicide:MyClass = new MyClass;
comitsuicide.addEventListener(PullTrigger.Gun, hang)
function hang(evt:TheVarNameiIsHere){
haleluya = ''or not"
doSomethingWitTheVar = TheVarNameiIsHere*10/5*(cos(90));
}