下載範例後, 我們在Flash Builder 作出以下設定, 便可運作:
- 建立ActionScript Project:
- 把下載的範例和away3d-core-fp11_4_0_7_gold.swc 複製至Project 中:
- 在Properties 的ActionScript Build Path 設定swc 路徑:
- 在Main-app.xml 設定 <renderMode>direct</renderMode> :
- 最後, 把Main 繼承(extends) 相關的範例:
package { import flash.display.Sprite; import flash.events.Event; [SWF(backgroundColor="#000000", frameRate="30", quality="LOW", width="1024", height="768")] //public class Main extends Advanced_ShallowWaterDemo //public class Main extends Intermediate_CharacterAnimation //public class Main extends Intermediate_Globe //public class Main extends Intermediate_Head //public class Main extends Intermediate_MD5Animation //public class Main extends Intermediate_MouseInteraction //public class Main extends Basic_View //public class Main extends Basic_Tweening3D //public class Main extends Basic_SkyBox //public class Main extends Basic_Shading public class Main extends Basic_LoadMD2 //public class Main extends Basic_Load3DS //public class Main extends Advanced_FractalTreeDemo { public function Main() { super(); } } }
若發佈至電話中運作, 設定與以上方法相似, 但某些範運作會出現錯誤.
API 參考資料: http://away3d.com/livedocs/away3d/4.0/
沒有留言:
張貼留言