Software Development -- Flash, Flex, C++, ASP.NET
Tags:

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.

Read more...

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.

This was an invalid situation and broke my app.

Here's a simplified version of the code:

Read more...

Tags:

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):

Read more...

Tags:

The Flash 8 documentation for perlinNoise() has this intriguing statement:

You can use Perlin noise functions to simulate natural phenomena and landscapes, such as wood grain, clouds, and mountain ranges.

OK. That sounds like fun. But how is this done? It's not immediately obvious, at least not to me. So I googled .

According to these links (here and here), the formula for wood is:

g = perlin(x,y) * 20;
grain = g - int(g);

It looks like we have to do the math on every pixel.

Read more...

Tags:

Since OSX first appeared, I've been in love with the aqua button look. I still love it.

CommunityMX has a great tutorial by Brian Edgin on creating an aqua button with Fireworks. It looks like a real piece of glass. I've seen a few Flash-only aqua buttons. They're very cool, but they're not as nice as the Fireworks version. Flash 7 was not capable of that degree of realism.

Read more...