AlecMcE.com

Coding on the Flash Platform

Archive for the ‘christmas’ tag

Further Festive Flakes

View Comments

Some more programmatic snow:

The Flash plugin is required to view this object.


roll-over to activate

This one is more simple, though the logic is exploded over multiple classes. You can get the source files here. I create a bunch of BitmapData objects with semi-transparent circles to represent snowflakes, called FlakeForms. Then, create a bunch of Flake objects which are essentially positions at which those formal flakes should be drawn. Each EnterFrame, wipe the BitmapData clean, update the flake positions and draw the formal flakes into the updated positions.

Read the rest of this entry »

Written by alec

November 24th, 2009 at 4:16 pm

Posted in animation,as3

Tagged with , ,

Festive Flakes

View Comments

It’s got to that time of the year again: the designer is bugging me to make programmatic snow in a new and interesting way. This was rejected, but is fun:

The Flash plugin is required to view this object.


roll-over to activate

The code for creating the flake pattern is FlakePattern.as, and can be downloaded here! I’ve also published the entire source code below the fold, if you’d prefer to browse.

The mechanism came straight out of the way I used to get KS3 (11-14) students to make snowflakes in Maths class at the end of term, translated into a more computational form. I didn’t add cut-outs to the mechanism; I would be interested to see the code if anyone extends the idea.

Read the rest of this entry »

Written by alec

November 24th, 2009 at 12:19 pm

Posted in as3

Tagged with ,