I’m building a custom component and I need to convert the event that is passed to the method into a mouse event. I can do this but it is telling me that I’m getting a null reference of an object. Here is how I am calling it.
public function dragStart(e:MDIWindowEvent): void {
var mouse:MouseEvent = (e.currentTarget as MouseEvent);
trace(mouse.localX);//<-----Null Error
}
How can I go by converting the MDIWindowEvent to a MouseEvent? If I can at that.
You are casting the Event target not the event it won’t work.
Also you can’t cast an MDIWindowEvent as a MouseEvent.
What you can try is:
Rob