Thank you for your suggestion, Brian. mx.events.LowLevelEvents was the key point.

Once the LowLevelEvents class is accessed, mix-in will be accomplished. That is, UIEventDispatcher.initialize() is called and mouse events are implemented.

mx.events.LowLevelEvents;  // *just access the class
import mx.managers.DepthManager;
import mx.controls.Button;
var myButton:Button = Button(this.createClassChildAtDepth(Button, DepthManager.kTop));
myButton.label = "Button";
myButton.move(10, 10);
var listenerObject:Object = new Object();
listenerObject.mouseOver = function(eventObject:Object):Void  {
        trace(eventObject.target);
};
myButton.addEventListener("mouseOver", listenerObject);

ASO files are properly overwritten because their time stamps are newer. And I keep the classes in the "First Run". Therefore I just remove modified classes for testing and restart Flash to restore the original ones.
_____
Brian Williams wrote:
Look at mx.events.LowLevelEvents.as

The way it works, as soon as you add an eventlistener for one of the low
level events, it will replace onPress, onRelease, etc with new methods that
dispatch an event.

Code that's in your configuration folder is only looked at once when
starting flash, so if you add a trace statement in
mx.events.UIEventDispatcher, you may need to clear your aso cache and/or
restart Flash to see the change.

If you're modifying any of those classes (even for testing purposes), it's
better to make a copy of the tree and put it higher in your class path, so
that flash will check it again if you make changes.

I remember reading a couple of blog posts about lowlevel events, so I would
try googling for "mx v2 lowlevelevents"

Regards,
--
Fumio Nonaka
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.com/
My books<http://www.FumioNonaka.com/Books/index.html>
Flash community<http://F-site.org/>

_______________________________________________
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

Reply via email to