That's right, your "move" event
was conflicting with the one inherited from UIComponent. When you write an event handler attribute
in MXML such as <mx:Label id="label" move="label.text=event.x"/> the MXML compiler autogenerates an event
handler that looks something like this: function _label_moveHandler_(event:MouseEvent):void { label.text = event.x; } which the runtime then registers with
addEventListener(). The compiler gets the event class
(MouseEvent) from the metadata and uses it to strongly type the 'event'
parameter as the correct event subclass. If it simply declared 'event' as an Event,
you'd have to cast in order to be able to access subclass-specific event properties
such as x: <mx:Label id="label" move="label.text=MouseEvent(event).x"/> So on any particular components, the "move"
event needs to be associated with a single event subclass, such as MouseEvent
rather than YourEvent. - Gordon From: Actually, never
mind. I think I figured it out. An event named "move" was
already declared previously by the framework. I guess I should just call
it something else. An interesting scenario, anyway... On 3/10/06, Jason Y.
Kwong <[EMAIL PROTECTED]>
wrote: My custom component broadcasts an event called "move".
So I declare it in the MXML:
|