Recipe 22.6. Overriding the Default Active Button State


Problem

You want to disable the yellow border that appears around the active button on the stage.

Solution

Give the button an empty Over frame or set the _focusrect property to false.

Discussion

By default, the Flash Lite player will draw a two-pixel yellow border around the active button, providing a visual cue as to which button is active. This behavior may be desirable for simple applications, but in many cases you will want to retain artistic control and design your own visual indicator for the active button. There are two ways to disable this automatic yellow border:

  1. If you wish to disable this border only for this button symbol (and all corresponding button instances), edit the button, select the Over frame, and insert a Blank Keyframe (Insert Timeline Blank Keyframe).



  2. Flash 8 Cookbook
    Flash 8 Cookbook (Cookbooks (OReilly))
    ISBN: 0596102402
    EAN: 2147483647
    Year: 2007
    Pages: 336
    Authors: Joey Lott

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net