Bitmap Filtering With AS3

It’s been far too long since I have had a few minutes to post on the topic of Flash or Actionscript, so I wanted to take a few minutes out of my incredibly hectic schedule and post something I’ve recently learned. I had been looking for a nice, clean way to come up with some more stunning visual effects for my studies, especially when they can be construed as boring by some based on content alone. After finding the Polygonal library on Google Code and studying their particle handling and demos, I decided to give them some sincere flattery and imitate their demo display. I found it to be incredibly clean, and the masking techniques exhibited make for a much more easily managed viewport. While this was a great boost for me, I was most impressed by seeing their incredibly simple solution to some visual effects I had been striving to achieve with some of my particle studies.
Continue reading

Particle Generation and Management Study

Over the past week, I have had opportunity to play with some ideas for particle generation that have been floating around in my mind for a while. Why particles? Well, while single object animations are great, there is a certain level of realism to movement in everything from explosions and fireworks to dust and debris when your environment can act upon the individual particles that make up your animation. Enter the particle generator. Instead of simply embedding an explosion movie into the appropriate scene, we can instead render a particle generator. These generators will then produce the debris for our effect, and each element (or particle) of that debris will be able to interact with its environment – from gravity to boundaries. By calculating each particle to have a mass of its own, the effects can be quite pleasing.
Continue reading

Movement and Event Handling with AS3

Target Practice in AS3

A couple days ago, I decided I wanted to teach myself a few movement algorithms withing Flash using Actionscript 3. I started with simple Event.ENTER_FRAME event trapping to move an object across the screen, and then I decided to make it a bit more interesting. What I ended up with is this small target practice game. It isn’t very feature rich by any means, but the different things I was able to learn and apply in a relatively short amount of time — like my particle system, easing an object into a destination and MouseEvent trapping — are invaluable to learn if you are going to do anything remotely professional with AS3.

Although I don’t claim to be a professional yet (that will come with time), my intent is to share any interesting discoveries I have made in order to help someone along through the learning stages I have just completed. Just below this paragraph, you will see the target practice game displayed. Simply click the targets to destroy them, and when you need more (or if you want to overload the app), just click the green circle in the top right. You will notice that a main feature of this app is significant randomization: from the position and motion of the targets to the amount and direction of the debris that scatters when those targets are destroyed. So, to aid in your learning, I have provided the source code for this app for you to study as well. The download link will appear at the end of the post.
Continue reading