Monday, February 28, 2011

Quickstart for Molehill and Away3D

*NOTE* - this is a TEMPORARY patch to get you up and running as quick as possible. To stay up-to-date with the latest Flex SDK and Away3D releases, please follow their announcements.



1. Install the flash player 11 "incubator" runtime: http://labs.adobe.com/downloads/flashplatformruntimes_incubator.html

2. Download the following files:
Flex SDK 4.5.0.19786 (this is a link to a new page where you have to agree to terms, then download): http://opensource.adobe.com/wiki/display/flexsdk/download?build=4.5.0.19786&pkgtype=1
flashplayer_inc_playerglobal_022711.swc: http://download.macromedia.com/pub/labs/flashplatformruntimes/incubator/flashplayer_inc_playerglobal_022711.swc
molehill_away3d_patch.zip: http://j0hn.org/molehill/molehill_away3d_patch.zip

3. Extract the flex sdk
4. Copy/paste the flashplayer_inc_playerglobal_022711.swc into your sdk's framework/libs directory
5. Copy/paste the files from molehill_away3d_patch.zip into the sdk to overwrite the necessary files.

What is the patch doing?
The patch includes an away3d.swc, an updated flex-config.xml to always set -swf-version=13, and an updated index.html.template to always set wmode="direct"

Why should I patch the sdk?
This is only for molehill prerelease dev work to make the setup process a little easier. Adobe will eventually release an updated sdk and tools that will make this patch irrelevant.

27 comments:

  1. Ricardo Schalch12:55 PM

    Had to be the great John Lindquist for teach us ! Tks so much

    ReplyDelete
  2. Jorge Dourado12:57 PM

    I hope to try it soon!
    Great! ;)

    ReplyDelete
  3. Sina Jazayeri12:57 PM

    Thanks for making it easy. Been looking forward to Molehill for a while.

    ReplyDelete
  4. [...] Quickstart for Molehill and Away3D by John Lindquist [...]

    ReplyDelete
  5. [...] un interesante tutorial sobre Molehill&Away3D 4 y cómo personalizar el SDK 4.5 para Molehill&Away3D 4, y cómo  por John [...]

    ReplyDelete
  6. Rkdresden4:15 PM

    Thanks!!

    Quick question, will we be able to use Molehill's 3d functionality with Away3d in a pure AS3 project, or will there always be flex dependencies?

    ReplyDelete
  7. johnlindquist4:21 PM

    Just because it uses the "Flex SDK" doesn't mean that it has "Flex dependencies". You're basically just using the compiler (mxmlc) from the SDK.

    If you're asking about using Flash Pro rather than Flash Builder, I don't know the answer to that question, but I would guess "yes".

    ReplyDelete
  8. Rkdresden5:13 PM

    Thanks for the clarification. You videos are an enormous help!

    ReplyDelete
  9. Are you going to help in the development of Away3D engine?

    ReplyDelete
  10. Anonymous9:30 AM

    Only if I get more 3D work in the near future, but I haven't even talked to the Away3D guys.

    ReplyDelete
  11. Super.. thanks for the tutorial :)

    ReplyDelete
  12. Aaron1:24 PM

    Hey bud, the link to the sdk on here looks broken. It can be downloaded from
    http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+Hero

    ReplyDelete
  13. Borange1:32 PM

    Great tutorial how to get started exactly what I need and by the way I love the cube application :D

    ReplyDelete
  14. [...] Quickstart fpr Molehill and Away3D Video Tutorial (5Min) [...]

    ReplyDelete
  15. Antti Hahl3:45 AM

    These additional steps will allow use of Flash Pro to compile broomstick molehill examples:
    1. Set Flash sdk path where you put the sdk 4.5.0.19786

    2. Add $(FlexSDK)/frameworks/libs/ to AS3 library paths. Also other libs included.

    3. Make a FLA with selected example.as as movie class.

    4. Make sure that document's library path doesn't have $(FlexSDK)/frameworks/libs/flex.swc set by default. This will not work as such file doesn't exists!

    5. Compile

    ReplyDelete
  16. Here is MoleHill Tutorial with Flash CS5....

    http://blog.kaourantin.net/?p=104

    ReplyDelete
  17. [...] http://johnlindquist.com/2011/02/28/quickstart-for-molehill-and-away3d/ [...]

    ReplyDelete
  18. Subbu reddy4:15 AM

    Thanks for the tutorial.

    ReplyDelete
  19. Philippe Carret4:44 PM

    Thanks for your video. I was able to make it working on Eclipse + Flash plugin 4.0 + SDK 4.5 + molehill +AS3.
    But I'm new to these kind of dev and can't make it working in my Flex App (flex 4 spark)

    ReplyDelete
  20. [...] of all, to get started using Broomstick, check out this article by John Lindquist. He did a great job explaining how to get started! Default materials in Away3D 4.0 are currently [...]

    ReplyDelete
  21. simply adding the modifications manually (compiler argument and embedding properties) is better than breaking Flex swc(s) compatibility with the "patched" flex-config.xml

    you ve been warned

    ReplyDelete
  22. Anonymous3:12 PM

    Heh, of course and feel free to write your own tutorial of that process for beginners to follow ;). Besides, soon enough, Adobe will release the SDK so we won't even have to worry about this process, but until then the "patch" is the quickest path to follow (well, except for bundling your own SDK and distributing it, but that's not exactly legal).

    ReplyDelete
  23. Aaron6:21 PM

    Thank you, John, this was a very helpful quick-start!  I got my feet wet, and now I'm trying to do more.  However, I ran into the problem of not having all the Away3d classes.  I'm guessing the molehill_away3d_patch.zip you built only contains a subset of what's available now?  Does anyone have any advice on integrating the classes from the trunk (http://away3d.googlecode.com/svn/trunk/broomstick) into John's quick-start?  Thanks in advance!

    ReplyDelete
  24. For Spark components in Flex Set backgroundAlpha="0"

    because stage3D is under the flex stage and you won’t be able to see it.

    set : backgroundAlpha="0" visible="false"

    ReplyDelete
  25. [...] this point on, you can head to minute 2:30 of John Lindquist's tutorial to see how to add an awesome cube to your project, or look into the Away3D examples. [...]

    ReplyDelete
  26. [...] Nothing happens when I try to render a cube using Away3D when I try to render a cube using Away3D + Molehill, I only get a white default screen, I followed the instructions here: http://johnlindquist.com/2011/02/28/quickstart-for-molehill-and-away3d/ [...]

    ReplyDelete