BeniRose,
[quoted text, click to view] > i wish there were a StackDepths or something so instead
> of swapping, it pushed all the levels below it back a level.
You realize you don't have to actually swap two movie clips, right? You
can simply specify a new depth for the desired movie clip by providing a
number.
[quoted text, click to view] > now I can't get the brightness change to work. I did a
> bunch of search, cause apparently Macromedia scored
> another big hit ...
I'd say Flash is a kick-@$$ hit!
[quoted text, click to view] > ... and decided to completely leave brightness out of
> actionscripting (I'm hoping they fixed this in flash 8?).
A) Brightness isn't "left out" of ActionScript. This is a bit like
saying physics and gravity simulation were "left out" of ActionScript. You
have to know the concepts involved, then apply the necessary math. B) How
do you "fix" something that isn't broken? You can add support for
something, sure.
[quoted text, click to view] > So after all my searching, i'm still confussed as hell. I
> understand you have to use a color object and use setRGB
> and fiddle with this stuff to change the "brightness".
That's putting it vaguely, but yes. Fiddling with it can get you a
brightness change. ;)
[quoted text, click to view] > I tried this, but all I got was a nearly black movie clip,
Let's see your code.
[quoted text, click to view] > Seeing as I have no idea how the heck to build a
> "transformation matrix" or what it even is for that matter
> I need some help.
When I was dealing with color transformations -- may have been a year
ago, or more -- I ran up against some of the same frustrations you're
seeing. When I didn't know something, I posted about it (which you're
doing, I know) and I also researched it. Anything worth having is worth
working for, even if that means months of research. I know what a
transformation matrix, but I don't think it applies here, to be honest.
Maybe that's a misunderstanding on my part, but here's the best tutorial
I've seen on matrixes. Granted, this article is for Flash 8 and it involves
resizing, skewing, and the like, rather than color, but it may at least give
you an idea what a matrix is.
http://www.senocular.com/flash/tutorials/transformmatrix/ Again, a matrix need not necessarily refer to size, skew, and position.
That said, I don't see, frankly, how to apply the notion of a transformation
matrix to the Color class in ActionScript. (Just because someone posted it
here, doesn't make it true. Caveat emptor.)
[quoted text, click to view] > Could someone please just explain in plain english, assuming
> I know nothing about the correlation between a hex number
> and it's corresponding colour (because i don't!) how I can
> change the brightness of my movie clip as if I was changing it
> in the properties panel.
Now we're talking! Grouching and complaining doesn't really do much,
but straightforward question-and-answer gets us somewhere. Let me explain
how a hex number corresponds to the more familiar sense of color.
The RGB colorspace is a way of describing a particular color in terms of
its three component parts: red, green, and blue. Pure red is the full
presence of the Red component and the absence of the others (255, 0, 0);
pure green follows suit (0, 255, 0); and so does blue (0, 0, 255). Pure
yellow is a mixture of pure green and pure blue (0, 255, 255), while
orange -- one particular orange -- is a particular mix of all three (255,
137, 50). So far, so good, I presume. We're all familiar with the color
picker in Photoshop, or the like, and this should make sense because it
roughly corresponds to the way me mixed paints in grade school.
So what about so-called hex? Well, "hex" is short for hexadecimal,
which is just another way of saying "base 16". Our everyday counting is
decimal, which means it is based on powers of ten. We have a tens column, a
hundreds column, a thousands column, and so on. For reasons beyond the
scope of this reply, computer calculation is often recorded not in decimal,
and in hexa (six) decimal (ten), which means it is based on powers of 16.
There is no tens column in hexadecimal. The tens column appears in
"normal" decimal notation when the 9 becomes a 10. Suddenly the ones column
starts over again at zero and the tens column advances to 1. That 1 and 0
together ... 10 ... make ten. If you want to describe the number fifteen,
that's a 1 in the tens column and a 5 in the ones column. Twenty is
described by a 2 in the tens column and 0 in the ones column.
You're still with me, right?
In hexadecimal, we have a ones column, a sixteens column, a two hundred
fifty-sixes column, and so on. To describe the number five, you simply put
a 5 in the ones column. To describe a ten ... well, you can't put a 1 in
the tens column, because there is no tens column: it's a sixteens column,
remember. Ten isn't high enough to go to the sixteens column yet, so it
still belongs in the ones column. And yet -- ten is a two-digit number!
What do we do? Well, the concept of ten isn't necessarily two-digit. It's
only two-digit in the decimal world. In hexadecimal, ten is a one-digit
number. By convention, we start with the letter A after the number 9 in the
hexadecimal ones column. So ten is simply A. Eleven is B, Twelve is C, and
so on. By sixteen, we finally roll around to the sixteens column, which
goes up by 1 while the ones column starts again at 0. Therefore, in
hexadecimal notation, the number sixteen looks like 10. Seventeen looks
like 11.
Remember, think of it in terms of columns. 11 is simply 1 in the
sixteens column and 1 in the ones column, which in decimal language is like
saying 16 + 1.
That said, the hex values you see in HTML and other places are simply
RGB triplets expressed in hexadecimal notation. r:0, g:0, b:0 is expressed
as 00, 00, 00. r:255, g:17, b:5 is expressed as FF, 11, 05. Get it? After
a while, you can actually start "reading" hex values by sight. Just break
up a given color, FF8932, into its three components, r:FF, g:89, b:32, and
you get ... hey, that's our orange from earlier.
Now, how to change brightness? Well, there are several common
colorspaces. Colorspaces are just a way to describe color. RGB should be
very familiar, but there's another, HSV (Hue, Saturation, Value [aka
brightness]) that describes color in a different manner.
Forget about transformation matrixes. What you need to do is convert
your RGB color into ts HSV equivalent first. Once accomplished, you can
adjust the V component (brightness), then convert back to RGB.
How is this done?
Wikipedia shows how, but it looks like pretty scary math.
http://en.wikipedia.org/wiki/HSV_color_space Your best bet is to fire up
Google -- now that you have some good new search terms -- and look up "hsv