Search code examples
apache-flexcanvasstage

Best way to make elements non-selectable in Flex


All,

As part of requirements for a new feature of "locking" a page, it is desired to have all elements on a locked page be non-selectable. This is not to be confused with disabled. All elements should appear as if the page were active, but not be selectable.

The current thought is to create a clear canvas and place it over the existing elements. With this thought, I have two questions:

  1. if you can think of a better way to make all items non-selectable than applying a clear canvas element over the existing elements could you describe it?
  2. if not, what is the best way to retrofit existing implementations to accept the overlayed canvas item? BTW, all .mxml pages inherit from a custom .as file.

Sorry if this is not very descriptive, however, I am new to Flex and have spent many days trying to figure this out.

Thanks, Todd


Solution

  • All,

    To fully "lock" a screen from user manipulation, one must combine Chris Bos's and www.Flextras.com's answers: disable mouse input (mouseChildren) and disable keyboard focus (focusEnabled).

    Todd