Adobe just released the preview versions of Flash Player Incubator which support low level 3D API codenamed Molehill several days ago. After a bit of google, I managed to setup FlashDevelop to publish Molehill content. Below are the brief steps on how to setup everything.
Adobe just released Flash Player 11 beta 2 earlier this month and their “Molehill” 3D API is now known as “Stage 3D“. This blog entry is not applicable now, so please refer to my new blog entry about this topic FlashDevelop Stage3D Away3D.
Install Flash Player Incubator
To view Flash Molehill content, you will need to install the alpha version of new flash player.
- Download and install Flash Player Incubator
Setup FlashDevelop with Flex Hero Framework and Away3D
To publish Flash Molehill content, you will need the new Flex Hero SDK. In my case, I will be using FlashDevelop and Away3D.
- Download and install Java runtime.
- Download and install FlashDevelop 3.3.4
- Download and extract Away3D Version 4.0.0 Alpha (Broomstick).
- Download and extract Flex HERO SDK build 220.127.116.1186.
- Download flashplayer_inc_playerglobal_022711.swc and rename it to playerglobal.swc
- Copy playerglobal.swc to [Flex Hero SDK Path]frameworks\libs\player\10.1. You will need to create the 10.1 folder
- Launch FlashDevelop and start a new AS3 Project. You can set your project folder to Away3D examples, if you downloaded them.
- Go to Tools>Program Settings>AS3 Context>Flex SDK Location. Fill in the location where you extract Flex Hero SDK.
- Go to Project>Properties>Class Paths. Click Add Class Path and browse to the location where you extract Away3D 4.
- Go to Project>Properties>Output>Platform. Change Target to Flash Player 10.1.
- Go to Project>Properties>Output>Test Movie. Select Open document from dropdown list. Click Edit button and type in FlashDevelop output location, usually bin\index.html
- Go to Project>Properties>Compiler Options>Additional Compiler Options. Key in -swf-version=13
- Add wmode: “direct” parameter for swfobject in the output HTML which usually at [Project Path]bin\index.html. Software fallback will be used if you do not include this parameter.
- Done. Right click on any of Away3D example source files which can be found at [Project Path]src, choose Always compile and GO!
- If you get error message like Type was not found or Call to a possibly undefined method. In FlashDevelop, open the libs folder in the project file list, right click and select Add To Library for both lib_simplegui.swc and MinimalComps_0_9_9.swc
- If you get an error about LZMA Decoder, download it here. Then extract it to [Project Path]libs. In FlashDevelop, select apparat-lzma-decoder-1.0-RC9.swc in the project file list, right click and select Add To Library.
- If you cant view the MD5 and MD2 examples, most probably the assets path is wrong. Just copy the assets folder from [Project Path]srcassets to [Project Path]bin
Posted in Scripting and Coding | Tags: 3D, ActionScript3, Flex, Tutorial