Stuff I am building:


Ted Patrick - Events & Community @ Adobe Systems


Note: This is the personal blog of Ted Patrick. The opinions and statements voiced here are my own.



Gradient PanelBase with AS

DIGG IT!     1 Comments Published Friday, February 18, 2005 at 4:58 AM .

As a follow-up to Dynamic Gradients in AS, here is the PanelBase. The PanelBase is a decoration control for creating an Panels, HBox, VBox, Dialogs, Windows, etc.

The version here supports:

1. Dynamically rounded corners via a property.
2. 12 Gradient types including none, vertical, angle, light, and dark.
3. PanelBase is resizeable via setSize methods.
3. Dynamically Color the gradients with RGB values.

The trick is using a mask with drawing API contents and a clip of 12 predefined gradients. Also you must hide the mask clip from V2 by blocking path lookups to the clips. V2 focusManager uses the drawing API to render glows on selected controls, when the glow is fired, clear() is called eliminating all drawing API content except the glow. You can avoid this by storing a reference to the mask in your class and having data that blocks access to the clip itself by name. FocusManager cannot reach in and overwrite your Drawing API layout.

Example:

Cheers,

Ted ;)

1 Responses to “Gradient PanelBase with AS”

  1. # Blogger Paul

    Nice, very handy I like the rotation feature of the gradient.
    How about the source? :-)  

Post a Comment

Where to find me:

Ted on Twitter - @AdobeTed
Ted on Adobe Groups
Ted on LinkedIn
Ted on Facebook
Ted at Adobe


Latest

Lists

Links

Jobs

Flex Jobs
city, state, zip

Archives