Archive for the ‘Experiments’ Category
An alternative to bitmap transparency in Flash
Posted by Will | Filed under Adobe Flash, Adobe Flex, Banners, Experiments, Tutorials
When it comes to using transparent bitmap images in Flash often you will find using a PNG is your best option. However, a major caveat with using PNG images is the significant increase in file size compared to non-transparent image types such as JPEGs and (non-transparent) GIFs. This often becomes an issue when working on projects with limited allocated file size, such as banner ads.

A transparent PNG of the above image has a file size of approximately 109kB
Lately I’ve been toying with an alternative to PNGs… using JPEGs. “Wait a minute…”, you say, “JPEGs don’t support transparency!”. That’s correct but by making use of Flash’s BitmapData class we can merge two non-transparent images together to make a single transparent image. Even though this method actually requires 2 separate JPEGs the total combined file size is almost always significantly smaller than a single PNG! (more…)
Flash Game Ad Manager – Coming Soon!
Posted by Will | Filed under Adobe Flash, Advertising, Banners, Experiments, Flash Games
In July of last year I wrote a post titled Monetizing your Flash game. Serving your own ads? In it I discussed ways Flash game developers could monetize their games through common methods such as sponsorship and ads. I also proposed a method of ’self serving’ ads in ones own games. I successfully implemented such a method in the two games I’ve published to date, Knight of the Dead and Picross Forever. While I personally have had limited success with privately selling ad space in both games I believe there is definitely value in putting control back into the hands of developers so they have complete control over ads displayed in their games.
In the next week or two I will be releasing an AS3 based class library called Ahrooga Ad Manager dedicated to the remote switching and management of in-game ads. Specifically this will allow game makers to use ANY available ad provider’s code in their game rather than being locked into just one. For example, you could have ad code for Mochiads AND GameJacket embedded in your game and remotely switch between them at your leisure. Want to disable ads all together on a specific domain? You can do that too. It also handles the loading and display of custom ads, either SWF or image based. (more…)
Light Steam
Posted by Will | Filed under Adobe Flash, Experiments
So it seems I’ve been neglecting this blog lately. I guess I’ve been a little busy now that I’m working full time again. Nonetheless I thought I’d throw up this little ‘light stream’ effect I’ve been working on. This is really just a re-imagining of a very similar effect I did for a banner ad a little while back.
This effect is achieved by combining several of the Flash players features such as the drawing API, Blur & Glow Filters, blendMode and BitmapData. The original version I did was built for Flash 8 in AS2, this version is AS3 but still built in a very similar way. I’ve made it customizable by being able to set the size, length and colours of the stream as well as being able to set the initial darkness.
I’m not sure what I plan on doing with it yet. I may work on it a little more still… who knows. Move your mouse around to see the light stream.
Distort an image in Flash 10 with DrawTriangles
Posted by Will | Filed under Adobe AIR, Adobe Flash, Experiments, Flash Games
One of the coolest features to come out of Flash Player 10’s new 3D capabilities is an addition to the Graphics class, the DrawTriangles method.
Most Flash designers discover early on that distorting a DisplayObject is impossible through the Flash IDE. This is unfortunately still the case (3D notwithstanding), however by making use of a bit of Actionscript trickery involving DrawTriangles we can create display objects that can be distorted dynamically at run time. Pretty cool I reckon!
This example shows how a Sprite containing a Bitmap fill can have it’s corners dragged, distorting the Sprite’s fill. You will immediately note that this example is not perfect. I’m only using 2 triangles here but it’s safe to say that by increasing the number of triangles will provide better results.
This next example is effectively the same as the above one except we are drawing an animating MovieClip to the BitmapData object used as the Sprite’s fill. The MovieClip is drawn to the BitmapData at the frame rate of the movie giving it an animated effect. This same technique can also be used for full motion video. (more…)



