Alternativa 8.5.0 with flex
The new alternativa3d version 8.5.0 has just been released and I’m dying to take a look at it and see whats changed and how it works. Unfortunately I don’t already have the incubator release of flash player 11 and my flex isn’t setup to compile the examples correctly either. I’m just about to set it all up and thought I’d make a post about it so others can get it done easily. So here is a quick run through of how to get started so you can build the examples and start working on your own. First up download the latest version of flex, the current version i was using was version 4 but there is now version 4.5 so grab that here. I like to put my flex in a folder called flex on my harddrive so mine is now at c:\flex Once you have that you need to download the playerglobal.swc file here http://download.macromedia.com/pub/labs/flashplatformruntimes/incubator/flashplayer_inc_playerglobal_022711.swc to compile with. So grab that and you want to put it in your frameworks/libs/player/11.0 folder it probably won’t exist already so create that folder and then drop in the playerglobal.swc. After you have done all that you will also need to have the flash player 11 molehill release if you don’t already. You can get this from here Now you can get to compiling the alternativa8 examples. I prefer to have batch files setup that will create and compile what I need, I wrote about these in my last flex alternativa post but here is an update example of what I’m using.
SET mxmlcPath="C:flexbinmxmlc.exe" SET opts=-benchmark=true -creator="David E Jones" -include-libraries="Alternativa3D.swc" -static-link-runtime-shared-libraries=true -swf-version=13 ECHO @ECHO OFF ^& (IF EXIST "%%~dp0%~n1.swf" (DEL "%%~dp0%~n1.swf")) ^& %mxmlcPath% %opts% -file-specs "%%~dp0%~n1%~x1" ^& (IF EXIST "%%~dp0%~n1.swf" (CALL "%%~dp0%~n1.swf") ELSE (PAUSE)) > "%~dp1%~n1.bat"
So drag your as file onto this batch file and it will create a new batch file at the location of the .as that you can run to compile it. There are a few things to note here, firstly you need to make use of the -swf-version=13 parameter or it won’t use the latest flash build. Secondly I couldn’t get the swf to run as standalone files as it tried to open my flash player 10 standalone exe to open it. You can download an unofficial standalone flash player 11 here but I haven’t had much luck forcing it to open with this automatically. What I actually have running is a html file that embeds the swf in the page seen as my browser loads up the flash player 11 fine. I recommend grabbing swfobject and doing something like this…
Its also been mentioned to me that the parameter wmode=direct allows the player to make use of the hardware acceleration.