Why wouldn't the events just be "press", "rollOver", and "rollOut"?
The listener could tell the dispatchers apart using event.target, if
necessary. Usually that's not even necessary, since different listener
functions can listen to the "press" events of different dispatchers.

At any rate, wherever you define instance functions, static values
will correspond to the value of the class they are defined in:

class SuperClass {
   public static var VALUE:String = "super";
   public function traceValue():Void {
        trace(VALUE); // traces "super"
   }
}

class SubClass extends SuperClass {
   public static var VALUE:String = "sub";
   public function traceBothValues():Void {
       traceValue(); // traces "super"
       trace(VALUE); // traces "sub"
       trace(SuperClass.VALUE); // traces "super"
   }
}

On 11/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi

I want to be able to dynamically assign handlers by passing static string 
variables to the superclass.

Shouldn't this work??

In my 'Super' class:

        private static var classgroup:String;
        private static var cmd_evtPress:String;//defined in subclass
        private static var cmd_evtRollover:String;//defined in subclass
        private static var cmd_evtRollout:String;//defined in subclass
        //constructor: augment in subclass
        public function MySuperClass(classgroup:String) {

                cmd_evtPress=classgroup+'_press';
                cmd_evtRollover=classgroup+'_rollover';
                cmd_evtRollout=classgroup+'_rollout';
                }


In my 'Sub' class:


       private static var classgroup:String='BG';
        private static var cmd_evtPress:String=classgroup+'_press';
        private static var cmd_evtRollover:String=classgroup+'_rollover';
        private static var cmd_evtRollout:String=classgroup+'_rollout';
        private static var root:Object//path to _root
        //constructor
        public function MySubClass() {
                super(classgroup);
}




[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca
--------------------------------------------
"...all improvisation is life in search of a style."
             - Bruce Mau,'LifeStyle'
_______________________________________________
[email protected]
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



--
T. Michael Keesey
Director of Technology
Exopolis, Inc.
2894 Rowena Avenue Ste. B
Los Angeles, California 90039
--
The Dinosauricon: http://dino.lm.com
Parry & Carney: http://parryandcarney.com
ISPN Forum: http://www.phylonames.org/forum/
_______________________________________________
[email protected]
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

Reply via email to