I’ve decided to share a bunch of flash games I build for various clients over the past few years. Most of these aren’t online anymore, and I thought it wold be a shame if they all went to waste : ) Read the rest of this entry »
Flash (in AS2) has one unpleasant habit. Interactive handlers (i.e “onRollover”, “onRollOut” , “onRelease” etc..) are being canceled as soon as you place a movie clip on the top of it with at least one interactive mouse handler defined.
Typical situation is a rollover pop up that needs to have some buttons on it. As soon as you rollOver those buttons, onRollOut event is triggered on the pop up, even though you still physically over it with your mouse.
There are of course different workarounds for this, but generally it’s a pain to code around this unfortunate behaviour.
AS3 doesn’t have this problem fortunately, but for the projects that still needs to be made in AS2 for whatever reason I created a MCEvents2Decorator class. Read the rest of this entry »
One of the sessions at Flash on the Beach got me interested into playing with particles. Seb Lee showed us an example of a using particles to explode a skeleton. You clicked on a skeleton and bones went flying. The only problem was, you had to manually break up the skeleton into a bunch of movie clips first and placed them into the skeleton timeline. That got me thinking… There must be a way for Flash to do this programmaticaly. So I spend some time (and caffeine) and wrote a class capable of doing just that…
Above demo loads the titles of the blog entries from durej.com , breaks them apart and uses them as a particles. You can also roll over with your mouse to trigger particle animation. Read the rest of this entry »
This is a highly subjective list of books I think every developer should read at least once. Some of them are worth reading couple of times, or from time to time coming back to re-read certain passages. The first 3 books do not mention Flash inside them even once. All five, however; do cover spectrum of Flash related topics. As this is a list of books flash developer should read, I do not go into areas of multimedia, there could be another list dedicated to just sound editing, just video editing, just to 3D etc.. Read the rest of this entry »
This is a 9 grid scale implementation class for BitmapData.
It was inspired by the the post on Bytearray blog , well this is basicaly its “slightly” different AS2 implementation. It’s aimed to be used mainly with the imported bitmap data (e.g. buttons from the photoshop PSD file). You need to have a library linkage name and “Export for ActionScript” checked on the bitmap. Read the rest of this entry »
First perhaps I should explain what I am talking about. One of the core OOP principles is a principle of a class being a “black box”. Or class’s encapsulation. Which means , it’s advisable not to expose inner working of a class , i.e. it’s methods, variables etc to the outside word. Instead , to communicate with that class , to choose a few clearly and carefully designed public methods , something being referred to as classes interface. In AS2 this is done of course by declaring the methods and variables as “private”.
Although ,majority of time, these are very good rules since there is a good reason behind them, on occasion it’s fine to break them providing the benefits of breaking them outweighs the consequences of doing so.
I discovered the method that enables very effective class 2 class communication. The trick is to define the function variable on a class that is being attached and delegate that functionality back to the main class, using Delegate class from package mx.utils. Read the rest of this entry »
In html is not unusual to have repeating smaller images or “tiles” filling up your background. In fact this blog has one as well.
In flash however, you don’t see this functionality very often. There are several reasons for that :
To determine how many tiles you need to fill up the space , you need to know it’s dimensions. You can only know that once the tile is fully loaded. Which is fine, you can load one tile, get it’s width and height, then determine how many you need to place vertically and horizontally and at what exact positions. And then all you need to do is to use duplicateMovieClip method to duplicate all the tiles off the first one you loaded. Right ?
Wrong. Due to the security restrictions you can’t duplicate the movieclips containing the assets that have been loaded externally. Fortunately came flash 8 and BitmapData. So you can use draw command to render the rest of the tiles on the stage. Read the rest of this entry »
Probably every flash developer has been at least once in his career asked to do a typewriter effect. So was I…
This class does the effect, with sound. You can either attach the texfield and send the string to be typed in init object, or have object already on the stage and use it’s writeText method. Read the rest of this entry »
This is a class that mimics the timer functionality of JavaScript. There are 2 variants : Timer class let’s you specify time in seconds and TimerFrameBased lets you specify the time in frames. Read the rest of this entry »