Your not alone burning the late night pixels.
Thanks for your response, this is a good idea.
Then you can get some kind of value that will translate to a function.
Hmmmm..
very interesting.
Thanks for the links too.
gnight
Karl DeSaulniers
Design Drumm
http://designdrumm.com
On Mar 29, 2009, at 1:48 AM, Anthony Pace wrote:
Hi Karl,
Kind of tired, so the easiest way I can think of to do this is to
evaluate and convert each pixel's RGB values to HSB and then
average your found values for all the pixels in the region the
loader is to be displayed within.
Hue, Saturation, Brightness..... if the brightness is less than 50%
(or 70% to 75% considering how colour value in black levels are
shown in most displays) go with the light coloured loader, else go
with dark.
http://www.google.ca/search?hl=en&q=rgb+to+hsb&btnG=Google
+Search&meta=
http://www.exampledepot.com/egs/java.awt/color_Hsb.html (should
be easy to convert to as3)
You could also use the inverse colour of a pixel to make it pop.
Anyone else have any bright ideas? Seriously, I am sure somebody
knows a better way.
Hoping my 2:41am ramblings help,
Anthony Pace
Karl DeSaulniers wrote:
I was wondering is there a way to recognize the density of pixels
in flash AS2 or AS3? The darkness or lightness.
For instance, say I have a loader that is dynamically loaded and
normally it would be, say, white.
But lets say I want it to have a script that detects the pixel
density of the MC behind it so as to let the loader mc know to
play on frame 1 or frame 2.
Frame 1 having a white loader and frame 2 having a black or grey
loader.
That way when the loader is dynamically placed over a MC with a
picture in it,
it will detect if there is a white picture (placing a black
loader) or if its a color picture (placing the white loader on top)?
Usage would be for say a photo gallery and while one picture is
being displayed, and the user clicks a new photo,
the previous photo does not remove until the new one is loaded.
Thus if I have a white loader and the previous photo was white
under the loader,
the loader is hard to see and the user sometimes does not know
that anything is happening.
I basically think it would just take a script that would map out
the x and y of the loader
and read the pixel density of the MC directly behind the Loader
(reason for the x and y theory)
then switch so the user will always see a loader. Either grey or
white depending.
Sounds good in my head, may not be too good (or easy) in code though.
Any thoughts would be great,
Thanks,
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders