I have setup a Maven repository for BealeARTS open-source components to allow easy dependancy management for those using Maven to manage your projects.
By default, Flex controls which can be "clicked" on by a user do not change the mouse cursor to the hand or pointer cursor when you "mouse over" them. This is a bit annoying as users now rely on this visual feedback as it is the default behaviour of HTML links on web pages.
It is simple to make a Flex control opperate like this, by setting its useHandCursor and buttonMode properties to true. However, this is not very convenient to do for every component in an application, leading some to extend each component in order to add this behaviour as default.
As this is also far from a perfect solution, my team wondered if we could use skinning to add this behaviour - after all it is presentational. Although there is no direct way to do this through a skin class, it turns out that one can access the component the skin is applied to, thought the parent property. So as the following ButtonSkin class shows, you can indeed use a Skin, applied to each Button using CSS, to set the use of a hand cursor.
/**
*
* Copywrite (c)2010, David Beale
*
*/
package com.bealearts.skin.component
{
import mx.controls.Button;
import mx.skins.halo.ButtonSkin;
;
/**
* Skin which adds a mouse-over hand cursor to a Button component
We have just launched a site for Land Rover in the US, it is designed to be a rich user experience for finding a certified pre-owned Land Rover cars in the USA.
This is my take on creating an Enumerator class in Flex.
AS3 does not support Enumerators so a class with static constants is used as per the Java Enumerator class pattern.
This implementation is type safe and final. It also contains static helper functions; values() which returns an array of the Enumerator objects (useful for iterations) and getByValue() which allows for easy retrieval of a typed Enumerator object from its primitive value.
package
{
import flash.errors.IllegalOperationError;
import flash.utils.Dictionary;
import flash.utils.describeType;
/**
* Example Enumerator Representing different RGB Colors
*/
public final class ColorEnum
{
/* PUBLIC */
publicstaticvar RED:ColorEnum = new ColorEnum('RED', PrivateEnforcer);
publicstaticvar GREEN:ColorEnum = new ColorEnum('GREEN', PrivateEnforcer);
publicstaticvar BLUE:ColorEnum = new ColorEnum('BLUE', PrivateEnforcer);
For those of you in the US who have had to use UK Postcodes to try out our Used Vehicle Locators, struggle no more! We have just launched a site for Jaguar in the US.
It is designed to be a rich user experience for finding a certified pre-owned Jaguar car in the USA.