0

I am using Parsley framework. In my application, messaging system of Parsley is working fine for custom events.

But, in some areas, I have event listeners for MouseDown, MouseUp events on some components. How to deal with flash inbuilt events ?

Thanks

tomjerry
  • 105
  • 1
  • 3
  • 13

3 Answers3

0

Try to use flex event handling for most possible cases .. unless there is a requirement to use the framework . add a eventhandler for that specific mouse event... on the object .. and handle it accordingly.

santosh1220
  • 107
  • 7
0

I haven't used Parsely, but I would think it works similarly to Robotlegs. In Robotlegs, I have wrapped such events in a separate event that protects its target and currentTarget from being changed (as would happen if you redispatched it), then send that event into the event bus. See http://riarockstars.com/2011/05/17/problem-solving-in-flex-and-robotlegs-drag-and-drop/ for more details.

Amy Blankenship
  • 6,485
  • 2
  • 22
  • 45
0

A missconception is to thing that Parsley should handle ALL messaging. Parsley's goal is to help you decouple your application. Decoupling is good to an extent, and Flex 4 (Spark) already let's you separate the logic from the View layout.

So you do not have to use Parsley's messaging for everything. Just like using Signals for everything isn't the best idea.

If you have a view that needs to communicate with models, commands, services, other views, etc... then you can have the view's event handler, dispatch a Parsley event.

Check out http://artinflex.blogspot.com/2010/09/quick-dive-into-parsley-basic-messaging.html for the basics.

Also in case you wish to have Parsley manage Flex Events then also check http://artinflex.blogspot.com/2010/09/quick-dive-into-parsley-messaging-with.html

Arturo Alvarado
  • 498
  • 1
  • 5
  • 10