Light Gauge
There’s been a bit of a flex component drought on the site lately, but I finally have the next one ready. It’s another gauge, but this time with blinkenlights. I’ve created a Light Gauge Explorer, where you can customize the gauge, or you can just skip to the Demo and see whats possible.
–Update: Source is now available here
Posted in Flex Components | 19 Comments
May 25th, 2007 at 9:54 am
That’s really cool. Are they all the same component, or do you have different ones for different layouts?
May 25th, 2007 at 10:44 am
There is just the one component, drawn in 3 different modes. Straight line, following a curve, or concentric circles. The rest is just color/thickness/etc. settings.
May 25th, 2007 at 11:56 am
Very impressive. I like the big round one in the middle. I want it on my next e-shirt.
May 25th, 2007 at 12:29 pm
Lookin mint bro! nice work.
May 28th, 2007 at 12:49 pm
I love the demo!
May 30th, 2007 at 2:03 pm
Awesome! I love it, and have already forward the link to many people in need of a cool gauge component! nice work!
June 3rd, 2007 at 5:27 am
I read you will open the source soonm. Any ETA ? Working on a project where I can use this RIGHT NOW. I think this is an extremely great addition to Flex.
June 3rd, 2007 at 10:33 am
The source will be available today (Sunday) or tomorrow
June 11th, 2007 at 12:12 pm
[...] First up is Alex Hofsteede’s Better Than Flex, which has been up for a few weeks now. Some interesting components in there including an ASCII video player and a Light Gauge. [...]
June 12th, 2007 at 8:11 pm
Very nice gauge !!
Cant wait to use this in my project!
June 13th, 2007 at 2:23 am
Possible to put the source for the Explorer also online ?
Greetings from holland!
June 13th, 2007 at 8:00 am
Yes, I’m thinking of creating a small addition to the explorer where it will output the appropriate MXML tag with all the properties based on the settings you have made in the Explorer. ETA some time in the next day or so.
October 7th, 2007 at 4:49 am
Thank you for sharing!
January 16th, 2008 at 7:07 pm
That’s great ! Cool stuff……
February 4th, 2008 at 10:25 pm
Amazing component. Great job and thanks for sharing.
Is it possible to get the source code for the Demo?
I would like to see how to make tha value changes smoothly.
Thank you.
March 28th, 2008 at 2:27 pm
this is ver ver solid component, thanks for hard work.
P.S :
I found a mini bug when you set lightStyle to “solid”.
here is use Case :
LightGauge.as line 124-145.
var boundaryIndex:int = Math.ceil(((_value – _min)/(_max – _min)) * _divisions) – 1;
——— Values Breakdown ——-
max =75
_value =100
_min =0
_division =40
(_value – _min)/(_max – _min) = 1.3333333333..
1.3333333333… * 40 = 53.333333
Math.ceil(53.333333) = 54
54-1 = 53
since _onGradient only holds 39 elements
next line :
graphics.beginFill(_onGradient[boundaryIndex].rgb,uint(_onGradient[boundaryIndex].alpha) / 255);
throws TypeError: Error #1010: A term is undefined and has no properties.
at com.betterthanflex::LightGauge/updateDisplayList()[D:\dev\_workspace\_Flex\flexshell_extern\src\com\betterthanflex\LightGauge.as:125]
April 27th, 2008 at 3:25 am
round one in the middle
June 9th, 2008 at 10:48 am
Hello. Love what you did. I’m a newbie and would love to use what you’ve done, however I’m totally lost. I’ve been using FlashDevelop and FlashBuilder 3 for a month now. I’ve been reading up on components, but still don’t know how to use your code. I’d like to make a radial dial as configured in your explorer. Any examples?
Thanks!
April 17th, 2009 at 7:11 am
I like it! I’m new to implementing components like this into projects. Is there an example I could check out that might show me how to do it?