Tutorial: AS3 in FlashDevelop

来源:百度文库 编辑:神马文学网 时间:2024/04/27 22:45:37
«FlashDevelop getting AS3 Support!
Flash 2: It’s Cinchy! »
Tutorial: AS3 in FlashDevelop
6th August 2006
[Update: Nov. 13, 2007]
Since I wrote this tutorial, FlashDevelop 2.01 has been released, which contains updated versions of the dlls mentioned here. So the steps regarding updating those things are not necessary if you have the latest build of FlashDevelop.
Also, I want to point out that you DO NEED to check the paths in the templates. The path to the Flex 2 SDK that is set in the default template is not the default install path. My bad. I set it to where I happened to install my SDK, which was a bit off of the default install location. If you don‘t change that in your template, your project will not compile.
[end of update]
Today marks the public release of the new AS3 parsing plugin and completed intrinsic files for the Adobe AS3 classes for FlashDevelop. I believe FlashDevelop now has probably the best AS3 support of any tool out there, other than Flex Builder 2. A future version of FlashDevelop will have more extensive support for AS3 and possiby Flex 2. The plugin and intrinsic classes are really meant as a patch to make it possible to get code completion and hinting in FlashDevelop. But even so, they work pretty damn well.
I‘m going to walk you through modifying your FlashDevelop installation so that it is a fully functional AS3 environment. A lot of these steps reflect my personal preferences in how to set things up, so you are free to use as much or as little as you want, or modify it in any way.
Step 1: Install all the tools and files.
First of all, you need to have the following installed:
FlashDevelophttp://www.flashdevelop.org Flex2 SDKhttps://www.adobe.com/cfusion/tdrc/index.cfm?product=flex New ASCompletion.dllhttp://flashdevelop.org/downloads/releases/ASCompletion-v1.0.1.zip Intrinsic Class Fileshttp://www.returnundefined.com/fdas3/
Install FlashDevelop as usual.
Take note of where you unzip the Flex 2 stuff. Usually a simple location like c:/flex_2_sdk is good.
Put the ASCompletion.dll in the plugins directory of your FlashDevelop install directory.
Put the class files wherever you want, but take note of their location.
For a fully integrated environment, you should also install the following:
Apache Anthttp://ant.apache.org The RunCommand pluginhttp://flashdevelop.org/downloads/releases/RunCommand-v0.1.zip My AS3 and Flex 2 Project Templateshttp://www.bit-101.com/flashdevelop/ProjectTemplates.zip
There‘s some info here on installing Ant:http://www.bit-101.com/blog/?p=627
The RunCommand plugin dll should also go in FlashDevelop‘s plugin directory.
The templates to in FlashCommand‘s data/Project Templates/ directory.
Step 2: Tweaking the Environment a bit.
First, it‘s nice to be able to build your project with the click of a button or a shortcut key. Open up the ToolBar.xml file, which you will find in FlashDevelop‘s Settings folder, and add the following line wherever you like:
PLAIN TEXT
XML: