Molehill from scratch with Adobe Flash CS 5

Flash Player builds with Molehill are now available for everyone to download. Many will want to start playing with this right away and many will probably ask: “What kind of crazy API is this? How do I get started? I don’t get it.”

There are two paths you can take: Either you get one of the available frameworks for Molehill like Away3D or you can take the deep dive and start from scratch. Starting from scratch can be a challenge since the APIs look intimidating at first. Let me give you a head start and provide you a Hello World type Adobe Flash CS 5 project using a famous 3D object: the teapot. From there it should be easier to experiment and explore.

To make it even easier I have added everything you need to get started with Adobe Flash CS 5 into the .zip file. Get the archive here. The most important part is that you need to copy two files into your Adobe CS 5 installation, follow the instruction in the archive.

Once you are all set up and compile the sample code you should end up with this:

Have fun experimenting! Don’t hesitate to ask questions.

Leave a comment

19 Comments.

  1. Hey Tinic, I’m having the same issue as richard with the Sprite3D code only with regards to com.display3D::Context3D. Set it up as per the instructions. No luck in FB too.

    • Are you sure you installed the Incubator plugin build? Does the Zombie Tycoon game work in your browser? Note that testing the movie will of course not work in Flash Pro itself. It will only work in a browser with an Incubator Flash plugin build installed.

      • that’s right. zombie tycoon works. I see the version 11 text in the bottom right. I just got this working with FlashBuilder too and had the same problem. It throws VerifyError: Error #1014: Class flash.display3D::Context3D could not be found.
        I put the playerglobal.swc into {sdks}/4.5.0.19786/frameworks/libs/player/11.0/playeglobal.swc and also into the proper folder in Flash Professional (and I installed the XML file and am compiling for 11). Wmode is direct. Maybe I’m missing something.

        I tried what was suggested here first, but the instructions for flashbuilder seem to be missing a step for putting the new playerglobal.swc into place.

        PS, i’m on a mac, 10.6.6 browser used for testing was FF 3.6.13

      • Finally got it working in FB. I missed typed my -swf-version=13 in the compiler arguments. And as for CS5, yes, I was testing my swf in the standalone player instead of the browser.

        Thanks for the help!

        This set of links was very helpful for me: http://www.disturbmedia.com/wiki/index.php/How_to_get_started_with_the_Molehill_API_and_Away3D_40.html#More_resources

  2. If it helps, I wrote a little bit of wiki for setting up with Away3D 4.0 : http://bit.ly/gKebfm

  3. Yep, that was my problem. Missed -swf-version=13 in compiler. Only realised when I tried to trace out the player version.

    All good now :-) Great stuff.

  4. Really thank you Tinic.

    Not being able to publish Flash 11 movies in Flash CS5 was one of my worries, and thanks to this not only I see it is possible, but how to extend it in the future.

  5. How and where (name of the 3D software) you generate the ‘teaPotIndexData’ and ‘teaPotVertexData’ data? Also really thank you :grin: