IntelliJ open source
[Logo] JavaRanch » JavaRanch Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Reply Bookmark it! Watch this topic JavaRanch » Forums » Application Frameworks » Flex
 
RSS feed
 
New topic
Author

Flex 3 : Dispatching an event

Ravi Kiran V
Ranch Hand

Joined: Apr 18, 2009
Messages: 1203

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

I tried to change the world, but I couldn’t find the source code
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Messages: 8544

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 V
Ranch Hand

Joined: Apr 18, 2009
Messages: 1203

Thank you i remodeled my code.

I tried to change the world, but I couldn’t find the source code
 
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Application Frameworks » Flex
 
RSS feed
 
New topic
IntelliJ open source

.