wood burning stoves 2.0*
The moose likes Flex and the fly likes Flex 3 : Dispatching an event Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Flex
Bookmark "Flex 3 : Dispatching an event " Watch "Flex 3 : Dispatching an event " New topic
Author

Flex 3 : Dispatching an event

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi
I am trying to Dispatch an event here .

My requirement is that , on mouseover event of a Button , i am trying to generate a event of type Mouse click and call a function .








This is my own written code and i dont like this way as you can see from the above code that i am using MouseEvent.CLICK number of times .

Please tell me how can this function handleMouseOver can be improved


Save India From Corruption - Anna Hazare.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

MouseEvent subclasses Event. Why not just write one event handling function that handles events and add it as the event listener for both mouse over and click events? That would save you having to reregister your click event handler and redispatch a mouse click event.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thank you i remodeled my code.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Flex 3 : Dispatching an event