Archive for the “Components” Category

For some odd reason you might want to get the width and height of the inside of a Container. You can use the "viewMetrics" property of a container to do it.

			/*-------------------------------------------------------------------
			   Returns a Rectangle object of the inside view area of a Container,
			   instead of the complete width and height.
			 ---------------------------------------------------------------------*/
			private function getViewRectangle(ui:Container):Rectangle
			{
				var e:EdgeMetrics=ui.viewMetrics;
				var r:Rectangle=new Rectangle();
				r.width=ui.width - (e.left + e.right);
				r.height=ui.height - (e.top + e.bottom);
				r.x=e.left;
				r.y=e.top;
				return r;
			}

In the following example I overlay a green box over a Panel to show how it matches the Panel's size.
Comments are welcome.
Read the rest of this entry »

Vote in HexoSearch

Comments No Comments »

If everyone got a turn, would you take your turn the same as the others or be different?

I've seen lots of really great knobs, dials, and gauge components. The intended way a person would build their app to use one would most likely be varied . That makes each of these kinds of controls  special because its difficult to make a control that fits a very broad range of functionality/look-n-feel, and probably why I have yet to see "one knob to rule them all".   Sliders, and Buttons are pretty straight forward, but not the "Knob" type of control.

Get Adobe Flash player

Read the rest of this entry »

Vote in HexoSearch

Comments 3 Comments »

Here is a Flex UI component I've been writing. Click the image to play with what I have made so far.
You can change a variety of properties. The dial and mark are runtime skinnable by setting its "dialBackgroundSkin" or "dialMarkSkin" property to a url with an image. 

Knobs and dials just look cool...I don't know anything about audio editing but I like the site of a sound studio. This is the "Reason" I decided to make a knob component.

Nice Knobs

Vote in HexoSearch

Comments 4 Comments »

Thanks for visiting www.keith-hair.net