File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Flex 3 : Dispatching an event

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you i remodeled my code.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic