Unlike ActionScript, JSFL does not have an include directive. I've started writing some useful jsfl classes, but having no include means a lot of copying and pasting and duplicated code. This is a bad thing.
So the other day, I was working on a component that has an inspectable set/get array property. I could not get it work. Although the default value for this array was not zero length and the parameter in the dialog box was not zero length, the set function was being called with a zero-length array at initialization.
Last week, I wrote an article about using Flash 8 Perlin noise to generate a wood texture. Today, it's marble.
According to this link, the Perlin formula for marble is:
texture = cosine( x + perlin(x,y,z) )
Again, we don't want to do math on every pixel -- too slow. So, how do we do this with the existing Flash 8 API? First, let's pretend that the perlin term in the above equation is not there. Here's what our image would look like (this image is arbitrarily blue monochrome):