As a developer, once in a while you discover something new that makes you go ”How come nobody ever told me about this and why do I only find this out NOW ? ” Last year, when I discovered that a Function in AS3 is also a class and can be used as a a [...]
Tag Archive for ActionScript 3
Prototyping: ActionScript’s best kept secret.
Blitting a Particle transition between two images.
Sometimes when you are experimenting around with flash, you’ll notice that things can get a little laggy when you put too many things on the stage and try to move them around at the same time. The Display List is a very fast and easy way to handle the way things are displayed on the [...]
More fun with Azoth: “Sierpinski Yourself”
You need a webcam to enjoy this blogpost to the fullest This post is a brief addendum of my previous post about Azoth. I was so excited about Azoth’s performance in my previous post that I didn’t take enough time to come up with a more practical example. Like I said last time, ByteArray operations [...]
Supercharge your ByteArray operations using Azoth
(edit: take a look at my next blogpost for more fun with Azoth !) I recently came across an interesting use of Adobe’s Alchemy technology. Basically what Alchemy allows you to do is run compiled c/c++ code inside of the ActionScript Virtual Machine. This in turn allows you to implement low-level optimizations that can lead [...]
optimizing the floodFill() method
If you ever used the floodFill() method that is provided in the AS3 BitmapData class, you know that it doesn’t always act like it’s supposed to. For those of you unfamiliar with it, the The floodFill() method is similar to the paint bucket tool in various paint programs. The signature of the method looks like [...]
Actionscript3 tip: faster property initializing
I was looking for a way to set parameters more quickly to newly added childs and I found out something interesting. (Note that this will not result in faster code execution, it’s merely to type less . I did some testing for the performance, check it out at the bottom of the page.) Normally when [...]
Creating cool text effects with actionscript 3
With the introduction of actionscript 3, one of the classes that came with a lot of new features is the Textfield class. To be more specific, we now have access to more information about the textfields content such as character, paragraphs and line metrics. The goal in this blog post is to show you how [...]
fl packages in flex/flash builder
Recently I tried using Five3D in a pure AS3 project using flex builder 3. Everything went well upon compiling, it was nagging that it (FB) couldn’t find the fl.motion.Color class. I looked into the Five3D code and it is indeed using the Color class to simulate basic shading. And actually that error wasn’t so weird [...]
A very simple facade
In one of our latest project we wanted to use some sort of an event system that would make it possible for components to dispatch events to each other even though they are not aware of each other or are not in the same displaylist structure. In that last example we would just use the [...]
3 ways to solve the “I want to call an event handler function directly” problem
Say you have an event handler that is called each time an event is triggered and you would like to call this function directly (so without waiting for an event to happen). See the following scenario of a ticking clock to make this more clear: - TimerEvent that changes the rotation of the clock handlers. [...]