all groups > flash actionscript > november 2004 >
You're in the

flash actionscript

group:

Creating a Flash Based Magic Wand Tool


Creating a Flash Based Magic Wand Tool complexity
11/11/2004 11:59:26 PM
flash actionscript:
Hey all, I am atempting to develop a RIA that would allow users to upload an
image to the application (that bit is fairly straight forward) Then using a
selection tool/magic wand tool, be able to select things from the image (eg. a
wall or an object) The selection works by expanding and wrapping to anything
that is a similar color to the inital pressed pixel. Has anyone done anything
similar to this in flash? Any help, suggestion, advice would be much
appreciated.
Re: Creating a Flash Based Magic Wand Tool dotnet2flash
11/12/2004 6:48:47 AM
Not quite sure if flash is the right tool to use for that...You'd need to scan
the pixels in the adjacent areas for color values that fall within the range
you're looking for, and I don't know if flash supports manipulating raster
images to that extent (or at all, really). I'd almost have to say that you'd be
better off implementing your app in shockwave (Director), or at least the
portion that deals with the image manipulation. You might think about
implementing the algorithm server-side so you can use .NET/COM/J2EE/etc. and
pipe the results of the scan back to the client app. Round-trip time would be a
bit of a pain for users on a slower connection, though.
Re: Creating a Flash Based Magic Wand Tool Peter Blumenthal
11/15/2004 9:57:43 AM
Probably not what you want to hear, but forget it. There is no way to
determine the colour of a bitmap pixel in Flash. As dotnet said - Director
Shockwave is probably the way to go. It has *much* more powerful image
manipulation API (getPixel() and setPixel() for instance).

While using a server side technology to do the pixel checking for you would
certainly be an intersting technical challenge, I very much doubt the result
would be particulary useable.

Re: Creating a Flash Based Magic Wand Tool complexity
11/15/2004 11:25:37 AM
Thanks for the posts guys. Havent had much to do with director so Ill look into
it. Id guess director is what is used with the benjamin moore personal color
viewer, that claims you can import your own images then paint them.
http://www.eisoftwareinc.com/store/start.asp?customer=bmv2 Might have to make
a purchase see how its done. Even if the web visitor have to load the shockwave
player, I wouldnt mind.
AddThis Social Bookmark Button