Hello,
I’ve just started tinkering with custom events and cannot figure out how to emulate flash event naming. For example; the MouseEvents can look like this:
MouseEvent.CLICK
MouseEvent.ROLL_OUT
etc…
however, in my events, I have to do something like this:
doThingOne.THING_ONE
doThingTwo.THING_TWO
etc…
I’d like it to look like this:
doAThing.THING_ONE
doAThing.THING_TWO
thanks for any help.
:jail: ->>:beer: please
Hello…again
I figured it out myself. I forgot about the ‘blind flexibility’ of OO Programming. For those interested, here is what I did:
The Event Class:
public class event{
public static const THING_ONE:String = “thingOne”;
public static const THING_TWO:String = “thingTwo”;
public function event(superDuper:String){
super(superDuper);
}
The Call:
dispatchEvent(new event(event.THING_ONE));
any simple solutions would be appreciated.
}