Sometimes you need to know when there is a mouse click in your Flex application.
Instead of listen to all the components you just can add the next listener:
systemManager.getSandboxRoot().addEventListener(MouseEvent.CLICK, onApplicationMouseClick);
private function onApplicationMouseClick(event:MouseEvent):void
{
//your code
}
Note: When the user prevents the default behaviour (event.preventDefault) of a mouse click event, the code above will not be triggered.
This is how you add a line to your Flex Spark skin without using a Rectangle (Rect) its strokes.
In this case a horizontal line will be drawn on the bottom of your skin.
<s:Line left="0"
right="0"
bottom="1">
<s:stroke>
<s:SolidColorStroke color="0xFAFAFA"
weight="1"/>
</s:stroke>
</s:Line>
When your Flex application needs an editable datagrid, you mostly add some itemEditors or itemRenderers to change the data.
You can find a lot of samples on the web, although it is not always that easy as most of them show.
This post shows a solution when you need an itemEditor that needs data different from the itemEditor its data property.
You can see an example of this blog post behind this link.
Read more…
Recent Comments