View Full Version : spraypaint tool
hangalot
10-22-2004, 03:08 PM
a spray paint tool i did for flash:
http://johan.plasmapudding.com/index.php?id=240
give me some feedback on features that can be added
i am thinking of adding the sprayradius and the size of the dots.
unfortunatly the tool just works on mouseMove
tdoublea
10-25-2004, 03:43 AM
hangalot,
nice tool! clean, concise code as well. i assume you've already though about it, but starting out at an alpha and building up consentration for how long the mouse is left down in one spot would be a nice feature. i haven't read any documentation on it, but an extra dropdown for spray size would make it complete (like the one for the brush). i wouldn't know the first step to getting that drop-down, though.
just a curiosity question, you said "unfortunately" it works on mouseMove. what would propose to be a better method?
once again, great tool. waiting to see what's next.
-t
hangalot
10-25-2004, 01:53 PM
heya,
thanks for the input.
instead of using mousemove i would rather have it fire an interval once the mouse button has been pressed, and removing the interval on mou button release. that way you would be able to drop fills in 1 spot almost like the photoshop spraypaint tool.
the problem with alpha is two fold based on this (and not)
1. because the mouse has to move to drop the fills, i feel i would have to analyze if there are fills currently over a certain position and AFAIK this is not possible with jsfl (yet, hopefully)
2. alpha is a killer in terms of processing.
what i was thinking in overcoming this is letting the user select two colors - a start color and an end color, and with some matrix math ('borrowed' from keith peters and robin debruili) do the fade in like that.
secondly i was thinking of maybe moving it to a winswf panel, instead of a tool, thus giving me access to intervals and the like, also making it possible to make it a tad more advanced. but this is sheer conjecture currently.
as to how to do the paintbrush selection, i would imagine xul could work, uncertain though. will have to look into that.
unfortunatly this week nor next am i going to be able to look at this since our project is hitting the critical straps now.
tdoublea
10-30-2004, 06:22 AM
interesting. setting an interval to count the difference between two colors?
i never would've thought about that. i throw out intervals for delays and stupid thing's clients want to look, as they say, "cool", rather than using it as a real counter.
when matrix gradients are brought up i always think of eric lin (http://ericlin2.tripod.com/grad/grad.html).
i still haven't found anything on adding brush size in the actual toolbar, but i haven't hit the pavemant too hard, and if you move the tool to a winswf, that can be resolved
i wish i could check out some things that you've got me curious about too, but i am in the same boat with work. keep us posted if anything new comes about.
-t
hangalot
10-30-2004, 09:22 AM
the whole mousemovement thing from a windowSWF is what is hindering me with this, i can create some can of statefile with the flFile api, but this seems crazy. (it all conceptual though, have only been thinking).
as to the color matrix function for jsfl, checkout bit-101's aqua buttons, there is a nice explanation along the way for doing color matrixes in jsfl.
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.