Post details: setPixel, getPixel, and the Flash 8 Beta bandwagon

07/15/05

Permalink 06:42:54 pm, Categories: Flash

setPixel, getPixel, and the Flash 8 Beta bandwagon

while of course i'm testing all existing sites with the beta Flash 8 player, i'm also playing with all the cool stuff people are "discovering".

while there are a growing number of filter experiments floating about the web, here's one i did that demonstrates the coolness of being able to draw (and query) pixels in user-created bitmaps.

Color Picker: http://lab.artificialcolors.com/f8/color_picker.html

Source: http://lab.artificialcolors.com/f8/color_picker.zip (or .FLA if you want just that)

yup - we're actually _drawing_ the color picker area pixel by pixel, line by line, then grabbing the RGB color underneath the mouse pointer. certainly being able to grab the color values of pixels is going to be one of those "huge" features for all sorts of visualizations and effects.

of course you need the Flash 8 Beta player, and you'll need to flip the version bit in the SWF if you recompile this code.

good times.

g.

Comments:

Comment from: Mario Falomir [Visitor] · http://blogs.cybermundos.com/mfalomir
Excellent example :) Everything that has been poping up regarding FP8 usability has been fascinating so far.
Permalink 07/15/05 @ 19:10
Comment from: Pablo Costantini [Visitor] · http://www.luminicbox.com/blog/default.aspx?page=post&id=49
Great example!
It's just incredible, there are no limits to this new object.

I added your example to my list :)
Permalink 07/15/05 @ 19:21
Comment from: Scott Hyndman [Visitor]
Very very cool.

Too bad it's not faster...but I guess you could do the work up front in an application.
Permalink 07/15/05 @ 19:56
Comment from: gwygonik [Member]
part of the slowness in my example is that i chose to visibly draw the color area. if i had done it all in one frame, it would be a tad faster (as well as freeze the app momentarily).

this slowness can, and should, be masked in a real app by pre-drawing the bitmaps during a "pre-loading" phase.

g.

Permalink 07/15/05 @ 20:21
Comment from: 1stPixel [Visitor] · http://localhost/cmse/nucleus3.15/
wait a minute ... you did what ? draw the coloboard ? is it possible that we take a bitmap for that ? or can we only read created pixels ?
Permalink 07/15/05 @ 20:39
Comment from: gwygonik [Member]
in the list of new functions that sites have discovered, there is a "loadBitmap" function, but nothing i've tried has worked. i would almost think it's not doable until the IDE comes out, since then you might be able to give a bitmap a linkage id and pass it to this function (which would TOTALLY rock). but as it stands, you can't give images linkage ids. :-\
Permalink 07/15/05 @ 20:46
Comment from: mray [Visitor] · http://www.mathewandamanda.com/nteract
It's interesting how things come full circle - have to dust off some old imaging Lingo experiments and see if I can apply them to flash now...

Although I am not sure you can capture the image buffer and manipulate it as quickly as director managed to do it - even on a machine with a tenth of the processing power. Certainly a step in the right direction!

BTW, see the new point and rect primitives in flash.geom? Some nice functions there that have been needed for quite some time... rect.contains, point.interpolate, awwww yeah!
Permalink 07/16/05 @ 04:09
Comment from: thebugswillbite [Visitor]
hi, nice feature, but how can one compile it? i didnt understand your explanation.

thank you:)
Permalink 07/21/05 @ 10:09

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.
Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, a, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
URLs, email, AIM and ICQs will be converted automatically.

Enter this code:
authimage

Options:
 
(Line breaks become <br />)
(Set cookies for name, email & url)

Search

Misc

Syndicate this blog XML

What is RSS?

The opinions expressed on this blog are those of the author only and are not necessarily those of his employer.

Creative Commons License
This work is licensed under a
Creative Commons License.

powered by
b2evolution