Away3D Lite is a new streamlined 3D Flash engine, based on Away3D. Learn how to get your first Away3D Lite application up and running with Flex.
Away3D Lite (download here) is a new Flash 3D engine based on the popular Away3D engine. Away 3D Lite includes the core Away3D components to create an engine that is small and fast – ideal for simple 3D applications like banners. Extracted the Away3D source files weigh in at 1.8 MB, whereas Away 3D Lite is only around 300 KB.
Also included in Away 3D Lite are a number of templates that can be used to get a new application up and running with a minimum of code. In this tutorial we will look at getting these templates working with Flex.
SpriteUIComponent.as
All of the Away 3D Lite templates extend the Sprite class. In order to add a control to a Flex application it needs to extend the UIComponent class – adding a Sprite using the addChild function will throw an exception. The SpriteUIComponent class provides a simple wrapper for a Sprite. The SpriteUIComponent adds a Sprite as a child of itself, and then the SpriteUIComponent can be added as a child of the Application class.
ExSphere.as
The ExSphere class is taken straight from the Away 3D Lite demos (which you can download here) – no modifications have been made. It extends the FastTemplate class.
A3DL_GettingStarted.mxml
This is the main Flex application. We set the appComplete function to be called when the application has finished loading. [code]
Then in the appComplete function we add a new instance of the SpriteUIComponent class as a child, with the SpriteUIComponent constructor being passed a new instance of the ExSphere class which it will add as its own child. [code]
Away 3D Lite is a great new engine that makes developing small 3D Flash applications quick and simple. With the SpriteUIComponent class providing the code necessary to use the new Away 3D Lite templates it’s also easy to use Away 3D Lite with Flex applications.
Go back to Away3D Tutorials
Away3D Lite Programming Tutorials - Terrain Demo
Find the limits of Away3D Lite by creating a highly detailed terrain demo.
Making your first Sandy-HX 3D JavaScript Application
This article shows you the steps required to setup, compile and run your first 3D JavaScript application.