Away3D 4.0 Bullet Physics

Below are the latest examples from github. The great thing about this physics engine is that it’s not a port of another physics engine to AS3. It uses an existing C++ library called Bullet Physics by using Alchemy to tie it into the flash player to increase performance.

Posted in Flash | Leave a comment

Away3D 4.0 Examples

Now that we’re all setup from the previous step let’s take a look at some examples from the away3d team.
You’ll need to download flash player 11 beta.

Most of the these examples are published as is with the exception of:

  • LightingTest – added lighting placholders and controls to illustrate the difference between PointLight and DirectionalLight. As you move around the PointLight it changes the amount of light that reflects off the model whereas DirectionLight has a constant level. To learn more about these lights check out this tutorial on webgl which I’ve found most helpful.
  • AlphaMapTest – Shows how transparent pixels from a png show through.

These aren’t all the examples from the git repository.
I will be adding the others on here soon and adding controls to manipulate the featured items within each example.

Posted in Flash | Leave a comment

Away3D 4.0 Getting started

These 5 relatively easy steps will get you up a running with away3D 4.

1.  Let’s start by downloading the away3d source and example files

  • git clone https://github.com/away3d/away3d-core-fp11.git
  • git clone https://github.com/away3d/away3d-examples-broomstick.git

2. Using flex builder 4 we’ll create 2 new projects

  • Create a new Flex Library Project pointing at away3d-core-fp11
  • and a new ActionScript Project pointing at the examples folder
  • add the away3d-core-fp11 Library project to the away3d-examples-broomstick project in the ActionScript Build Path
  • within the html-template/index.template.html insert params.wmode = “direct”; (this will tell flashplayer11 to use your graphics card)

3. Next, we’ll need to download and install the required flash players and flash debug players from http://labs.adobe.com/downloads/flashplayer11.html.  I’m on a mac so I’m going to grab:

  • Flash Player 11 Beta 2 32-bit Installers
  • Flash Player 11 Beta 2 32-bit Content Debuggers**

4. Then, copy Flash Player 11 Beta 2 Global SWC and place it into a new folder 11.0 within your current sdk at the following location:

  • 4.1.0/frameworks/libs/player/11.0/playerglobal.swc

5. Now to link our current project to the playerglobal.swc we need to do 2 things in our ActionScript Compiler

  • Under Adobe Flash Player options Use a specific version: 11.0.0
  • Under Additional compiler arguments: -swf-version=13

Keep in mind that the git repository is changing on a daily basis and some files may not compile correctly.

Posted in Flash | 2 Comments