Drawing a rectangle on a flex canvas is there a better way than

actionscript-3apache-flexcanvasgeometry

To draw a "selection rectangle" from the mouse down , mouse move then remove it on mouse up i currently do the following:

My board is a canvas,
On mouse down i create a new UIcontainer i set his borders.
I update his width and height related the the mouse move position,
on mouse up i remove this child UIcontainer.

Do i have to create a new component for this kind of task or there is a better (lighter way) in flex ?

Thanks,

Best Answer

Here is an Flex selection rectangle example, although I think it won't be a better/lighter way, perhaps you can get some nice ideas from it.

Related Topic