November 2007 Archives
3D engines:
Papervision3D - The most popular 3D engine. Easy to implement, amazingly powerful.
http://blog.papervision3d.org/
Away3d - branch of Papervision3D focusing on advanced rendering and materials
http://www.away3d.com/
Sandy - Great engine for small games. Sandy was the original 3D engine, and is still quite an ambitious project.
http://osflash.org/sandy
Physics:
APE (Actionscript Physics Engine) - While still in early development, this is a great framework for simulating 2D physics in flash.
http://www.cove.org/ape/index.htm
Animation:
Tweener - This is the AS3 port of mcTween, and it is fantastic. It has excellent event handling, and support for a lot more parameters than typically necessary.
http://code.google.com/p/tweener/
Audio:
Popforge - This is a library built for controlling audio playback in AS3.
http://code.google.com/p/popforge/
Image Editing:
Imageprocessing Library (Flex Only at the moment) - Great library for doing advanced image transformations and adjustments.
http://blog.je2050.de/imageprocessing-library/
Data / Remoting:
Amfphp - An extremely fast way to work with external data by communicating with PHP files through ActionScript Message Format. It is a fast versatile way to provide mySQL data interaction for your flash / flex apps.
http://www.amfphp.org/
Mashup Libraries
These are libraries that allow integration of data from various web sites with flash applications
Flickr - http://code.google.com/p/as3flickrlib/
YouTube - http://code.google.com/p/as3youtubelib/
Mappr - http://code.google.com/p/as3mapprlib/
Facebook - http://code.google.com/p/facebook-actionscript-api/
Yahoo - http://developer.yahoo.com/flash/astra-webapis/
Ebay - http://code.google.com/p/as3ebaylib/
Amazon Web Services - http://code.google.com/p/as3awss3lib/
Odeo - http://code.google.com/p/as3odeolib/
LastFM - http://code.google.com/p/lastfm-as3/
Atom / RSS Syndication - http://code.google.com/p/as3syndicationlib/
For more open source projects, visit these sites:
http://osflash.org/projects
http://code.google.com/#q=actionscript
This is quite a simple tutorial. It is more about design than programming. It will cover adding an application gradient background, and then overlaying a tiled PNG pattern on top. With a little creativity, this effect can make a nice application or website background that is not easily reproducible with html / css.
First, begin by setting up your application. First we’ll add a background gradient, and set up a few other parameters:
| <?xml version=”1.0” encoding=”utf-8”?> <mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” width=”100%” height=”100%” fontAntiAliasType=”advanced” layout=”absolute” backgroundGradientColors=”[#535353, #2f2f2f]” horizontalScrollPolicy=”off”> |
Next, we add a VBox that will take up the whole application background. The CSS class dottedBG will contain the location for the tile image:
| <mx:VBox width=”100%” height=”100%” verticalAlign=”top” horizontalAlign=”center” verticalGap=”0” paddingLeft=”0” paddingRight=”0” paddingTop=”30” paddingBottom=”20” styleName=”dottedBG” horizontalCenter=”0”> |
Finally, add the CSS class:
| .dottedBG{ background-image: Embed(“dottedtile.png”); } |
I will post the source for this example soon. Feel free to post links to your own examples.
| drawHeaderBackground(headerBG:UIComponent):void drawRowBackgrounds():void drawRowBackground(s:Sprite, rowIndex:int, y:Number, height:Number, color:uint, dataIndex:int):void updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void |
Next, comes the actual override code. I have created an AS file named DrawListingsGrid.as in the pkg/controls/ directory of the project. I have added comments as place holders in the areas where adjustments are made.
package pkg.controls import flash.display.DisplayObject; use namespace mx_internal; public class DrawListingsGrid extends DataGrid // embedding an image for the row background // embedding an image for the header background // filling in header with embedded background image
//fill the row background with the embedded image |
In order to use this class, you will need to embed it as a custom component in the MXML file.
| <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:con="pkg.controls.*"> |
Next, you can actually add the component to the stage, by referencing the link from the header:
<con:DrawListingsGrid width="100%" height="100%"> |
