Tuesday, October 18, 2011

Flash player 11 + Flash builder 4.5 + Flash CS5

Finally managed to get flash builder 4.5 to publish SWF for flash player 11. 
specifically using Stage3D
  1. Download the PlayerGlobal SWC and debugger player from http://www.adobe.com/support/flashplayer/downloads.html
  2. go to flash builder installation path: "Adobe Flash Builder 4.5\sdks\4.5.1\frameworks\libs\player"
  3. create a new folder "11.0"
  4. copy the SWC into this folder. 
  5. install the debugger player for your browser
  6. Create a new ActionScript project
  7. Go to project properties > Flash Player version > 11.0.0
  8. Add "-swf-version=13" under Compiler Arguments
  9. Add code. eg.: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display3D/Context3D.html#drawTriangles() 
  10. Run the application. 
should work now.

for Flash CS5
  1. Do the same as above for step 1
  2. go to flash cs5 installation path: "\Adobe Flash CS5\Common\Configuration\ActionScript 3.0"
  3. create a new folder "FP11"
  4. copy the SWC into this new folder
  5. go to: "Adobe Flash CS5\Common\Configuration\Players" folder
  6. copy the old "FlashPlayer10_1.xml" to paste as a new "FlashPlayer11.xml"
  7. Edit the XML using NotePad
    Change the following:
    'player id="FlashPlayer11" version="13" asversion="3"'
    '<name>Flash Player 11</name>'
    'as3="$(AppConfig)/ActionScript 3.0/FP11/playerglobal.swc" '
  8. Save and close the XML. 
  9. Go to folder: "Adobe Flash CS5\Players\Debug"
  10. copy the debugger EXE into this folder. change the original FlashPlayerDebugger.exe to  FlashPlayerDebugger_OLD.exe and change the name of the copied EXE to  FlashPlayerDebugger.exe 
  11. Close Flash CS5 and restart. 
  12. Create a new Actionscript 3 FLA.
  13. In Profiles > Version > Flash Player 11
  14. Change rendering to "Direct"
  15. Run the movie by using the Debug movie. Ctrl+shift+enter