Requires Install of Flash Player “Stage3D”

Download Example / Launch Demo

Away3D specifically broomstick really cleans up the competition should look out. It is easy to use and is ridiculously fast! The upcoming flash player is such a leap from the previous versions its really quite astounding. So if you haven’t downloaded that latest flash sdk and plugged it into your flash builder you are really missing out on a great deal. With Flash Player 11 support on mobile it will be a big deal not to mention all the new cool 3D capabilities that will run on literally any desktop and most mobile devices! It will allow you to quickly create games and interactive experiences and easily share them and sell them trough app stores so the time to learn it is truly now! Be proactive build today for tomorrow. You won’t have to purchase multiple product suites to accomplish your goal with web premium you can simply get it done quickly. I have been waiting for this product for awhile and I am really looking forward to taking full advantage of it as a developer! As a teenager I can remember downloading Wolfenstein off of a BBS and running it on my 486 that ran windows and dos-shell. I thought it was the coolest thing on earth! I spent coupious amounts of time palying it because it was the first true 3D experince on copmuters and it was shareware! In the past we have been able to create compleling 3D experinces on flash but never before to this extent! Stage3D formerly Molehill will allow us as developers to build emmersive interactive enviorments that are more engaging than Quake3 because it scales not to mention we have a rather large amount of libraries at our finger tips like the Hype Framework, TweenLite, Tweener, JigLib, etc… We also have access to manipulating audio and video the browser currently only dreams of. These libraries help us accomplish what ever goal we may have. I am by no means a pro with Away3D although I love using it and I have learned a great deal from it.

So anyway enough lets take Away3D out of the box and have some fun with it! What am I doing? Playing with the cloning ability, the Bloom filter, and making the fish dance to audio with the Hypeframework and trying to absolutely crush your browser while having fun. Also if you didn’t know one of the new features of flash player 11 aka Stage3D formerly known as Molehill is native JSON which is in my opinnion kind of hot! So lets let the player do it’s work and have fun with it! The demo I am displaying would have grinded your browser to a complete halt in the past you can see now that it is lighning fast and I am sure my quickly written code could be optimized so check it out! It doesn’t crash your browser! It also will parse a twitter object that utilizes the search query for Molehill if it fails it does so gracefully please keep in mind this is alpha software.

The Code:

	// Away 3D broomstick
	import away3d.cameras.Camera3D;
	import away3d.cameras.lenses.PerspectiveLens;
	import away3d.containers.ObjectContainer3D;
	import away3d.containers.View3D;
	import away3d.core.base.Object3D;
	import away3d.debug.AwayStats;
	import away3d.entities.Mesh;
	import away3d.filters.BloomFilter3D;
	import away3d.filters.MotionBlurFilter3D;
	import away3d.library.AssetLibrary;
	import away3d.loaders.AssetLoader;
	import away3d.loaders.Loader3D;
	import away3d.loaders.parsers.AWDParser;
	import away3d.materials.BitmapMaterial;
	import away3d.primitives.Sphere;
    // Lee's library
	import com.theflashblog.utils.Math2;
	// flash stuff
	import flash.display.Sprite;
	import flash.geom.Vector3D;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;
	// greensock tweenlite 
	import gs.TweenLite;
	// hype because it is awesome
	import hype.extended.behavior.FunctionTracker;
	import hype.extended.layout.GridLayout;
	import hype.framework.sound.SoundAnalyzer;
	[SWF(width="900", height="600", frameRate="60", backgroundColor="#000000")]
	public class tweetank extends Sprite
		private var _view : View3D;
		private var _loader : Loader3D;
		private var urlRequestContainer:Array = new Array();
		private var Ocean : Class;
		private var mesh:Mesh = new Mesh();
		private var material : BitmapMaterial = new BitmapMaterial(new Ocean().bitmapData);
		private var fishy:Object = new Object();
		public var camera:Camera3D;
		public  var fishArr:Array = new Array(); 
		private var origin:Vector3D=new Vector3D(0,0,0);
		private var OceanSphere : Sphere;
		public var soundAnalyzer:SoundAnalyzer;
		public var sound:Sound;
		private var musicChannel;
		public var xMove:FunctionTracker;
		public var xScaleTracker:FunctionTracker;
		public var yScaleTracker:FunctionTracker;
		public var zScaleTracker:FunctionTracker;
		private var loaderJSON:URLLoader;
		private var _motionBlur : MotionBlurFilter3D;
		public function tweetank()
        	// lets have some fun with away3D
			_view = new View3D();
			_view.width = stage.width;
			_view.height = stage.height; = -1000;
			camera =;
			camera.lens = new PerspectiveLens();
			camera.lens.far = 8000;
			_view.mouseEnabled = true;
			_view.filters3d = [ new BloomFilter3D(100, 100, .5, 2, 1) ];
			this.addEventListener(Event.ENTER_FRAME, handleEnterFrame);
			// init the HYPE sound analyzer
			soundAnalyzer = new SoundAnalyzer();
			// load the json vars
			loaderJSON = new URLLoader(
		    new URLRequest(""));
			loaderJSON.addEventListener(Event.COMPLETE, onLoaded);
		// lets make some stuff move!
		private function moveCamera():void
						x: Math2.rand(-800, 800),
						y: Math2.rand(-400, 400),
						z: 1400 + Math2.rand(-2800, 0),
						delay: 2,
						onComplete: moveCamera,
						onUpdate: onCameraMove
		private function onCameraMove():void
        	// hone in on the school of fish shall we
			var fishArrVector:Vector3D = new Vector3D(fishArr[5].x,fishArr[5].y,fishArr[5].z );
			camera.lookAt( fishArrVector );
		private function onComplete(e:LoaderEvent):void{
			var fishyLength:Number;
            // I will perfect the JSON later sorry kind of lazy.
            // Also kind of trying to donkey punch your browser how is it holding up?? Well!
				fishyLength = fishy.results.length;
				fishyLength = 15;
				var twitterFail:TextField = new TextField();
				twitterFail = new TextField();
			    var _label_format : TextFormat = new TextFormat();
				twitterFail.defaultTextFormat = _label_format;
				twitterFail.autoSize = TextFieldAutoSize.RIGHT; 
				twitterFail.text = 'Sorry Parsing of the Twitter feed Failed:(  It is an alpha flash player version.';
				twitterFail.x = 200;
				twitterFail.y = 2;
				twitterFail.selectable = false;
			for(var i:uint = 0; i<fishyLength; i++){
				var ObjContainer:ObjectContainer3D = new ObjectContainer3D();
				ObjContainer  = ObjectContainer3D(AssetLibrary.getAsset('main'));
				fishArr[i] = new ObjectContainer3D();
				for(var j:uint = 0; j<ObjContainer.numChildren; j++) 
					var obj3D:Mesh = new Mesh();
					obj3D = ObjContainer.getChildAt(j).getChildAt(0).clone() as Mesh;
					obj3D.mouseEnabled = true; = i.toString();
					obj3D.addEventListener(MouseEvent3D.CLICK, goFish,false, 0, true);
					var obj3DContainer:ObjectContainer3D = new ObjectContainer3D();
						urlRequestContainer[i] = "!/" + fishy.results[i].from_user;
					fishArr[i].x = Math2.rand(-400,900);
					fishArr[i].y = Math2.rand(-400,900);
					fishArr[i].z = Math2.rand(-400,900);
					var baseFrequency:uint = (90 % 64)*4;
					var xMove:FunctionTracker=new FunctionTracker(fishArr[i],"scale",dancingFish,[i,fishArr[i]]);
			var radius:Number = new Number();
			var seg:Number = new uint();
			radius = 3000;
			seg = 100;
			OceanSphere = new Sphere( material, radius, seg, seg );
			OceanSphere.scaleX = -1;
			addChild(new AwayStats(_view));
		private function onResourceLoadingError(e:LoaderEvent) : void
			trace("Oops, file loading failed");
		private function onResourceMapsLoadingError(e:LoaderEvent) : void
			trace("A map failed to load in this model: ["+e.url+"]");
		private function handleEnterFrame(e : Event) : void
			OceanSphere.rotationZ +=0.5;
		public function playMusic():void {
			sound = new Sound();
			sound.load( new URLRequest( "test.mp3" ) );, int.MAX_VALUE);
				musicChannel.removeEventListener(Event.SOUND_COMPLETE, loopMusic);
			musicChannel.addEventListener(Event.SOUND_COMPLETE, loopMusic);
		public function loopMusic(e:Event):void {
			if (musicChannel!=null) {
		private function dancingFish(i:uint, twFishOne:ObjectContainer3D):void {
			var baseFrequency:uint = (i % 64)*4;
			var xScaleTracker:FunctionTracker=new FunctionTracker(twFishOne,"scaleX",soundAnalyzer.getFrequencyRange,[baseFrequency,baseFrequency+4,1,2]);
			var yScaleTracker:FunctionTracker=new FunctionTracker(twFishOne,"scaleY",soundAnalyzer.getFrequencyRange,[baseFrequency,baseFrequency+4,1,2]);
			var zScaleTracker:FunctionTracker=new FunctionTracker(twFishOne,"scaleZ",soundAnalyzer.getFrequencyRange,[baseFrequency,baseFrequency+4,1,2]);, 5, {x:twFishOne.x + 10, y:twFishOne.y + 50, z:twFishOne.z + 50});
		protected function onLoaded(event:Event):void
                       // Lets parse some JSON directly as an Object lets see how accurate the native parser!
			fishy = JSON.parse(;
			_loader = new Loader3D;
			_loader.load(new URLRequest('assets/models/MdlFish.awd'), new AWDParser()); 
			AssetLibrary.load(new URLRequest('assets/models/MdlFish.awd'));
			AssetLibrary.addEventListener(LoaderEvent.RESOURCE_COMPLETE, onComplete);
		protected function goFish(event:MouseEvent3D):void {	
			var lnk:int = int(;
			var myURL:URLRequest = new URLRequest(urlRequestContainer[lnk]);

Download Example / Launch Demo

When I look at something like three.js I also love it too and I know that many of its greatest abilities were borrowed form the flash camp! Open source gives way to more open source. The community of developers often learn from the code that is in the open source community and this allows for future innovations! You can see the similarties between the three.js code base and projects like away3d. It is amazing how many options we have as developers today. With Molehill, webGL, and Silverlight all going at it we as developers profit! Three.js was prominetly displayed on at google IO and the project is simply amazing check it out! I am anxious to see where webGL will take us. You can view the interactive film that Chris Milk and Google Developer Aaron Koblin

What is 3 Dreams of Black?


Molehill is a mountain it is a big deal for developers and a quantum leap for developers! If you haven’t checked it out yet you should! Why? Probably because it is supported on Android devices and will be supported on many platforms beyond just Android. It also appears to run quickly and degrade gracefully for mobile devies and the desktop. Not to mention you can use all of your favorite AS3 libraries with it! So needless to say I am exceptionally excited about it as a developer! I purchase Adobe products and love them and enjoy using them! I think Unity3D is a really cool technology and their is a great deal to be said for it. I live in the mid west and I pinch my pennies, I spend more on my Apple than I do on my car and I mean that in a literal way. That being said I am not a fan of purchasing multiple license for the same product. I also like to program and the thought of one program doing all the dirty work for me takes the challenge and learning experience away. Although with business their are some cases where that scenario is simply a necessity. I also like open source because it helps developers like myself learn and closed technology seems to pin you in a corner. I have been making lots of webGL demos lately and I am equally excited about Molehill/Stage3D because I can utilize tools I already use and own to produce outstanding web and mobile experiences! It has alway been essential for Flash to be ubiquitous and I am confident that it will strive ahead the new features in the Flash player and Air are truly innovative. I also love to use other technologies and explore new ideas. I firmly believe that competition keeps people sharp and companies striving for innovation and that is essential because the consumer wins in this situation every time! So I am really excited about the future Windows Vs. Google Vs. Apple it means we all win! I am also looking forward to playing with the windows phone Silverlight5 looks cool!