Pre-requisites Installing FlashDevelop
That is all there is to installing FlashDevelop, easy eh? This is one of the reasons it‘s getting so much kudos in the OSFlash community. What about Flex2/AS3???? Flex2 SDK AS3 Code Completion MXML completion And that is it for setup! You should now have a Flex2/AS3 development environment ready to go. If you want to jump straight in I would suggest reading up on the AS3/MXML custom @mxmlc quickbuild tag, however if you want to make sure everything is working stick with me for an amazingly exciting HelloWorld!!!! HelloWorld! AS3 Actionscript:
If you type the above (instead of copy paste) replacing the default class structure (that‘s AS2) you should notice you have AS3 intellisense and code completion! Cool eh? Now to run the project, simply click the Quick MTASC Build button (grey cog with a red bug on it) and if all has gone to plan you should see your first AS3 swf file created and loaded for your viewing pleasure. If it worked congratulations! If not, post a comment here or on the FlashDevelop.org forums and I‘m sure we‘ll get it sorted. HelloWorld! MXML XML:
Again, you should notice you have mxml intellisense and code completion making it a breeze to knock up an mxml layout. Next head over to the Adobe Flex2 quickstarts and start finding your way around Flex2 and AS3! Any comments, suggestions, corrections, questions etc feel free to bang into the comments.
搭建免費(fèi)的flex2&as3開發(fā)環(huán)境:flashdevelop2.0.21.下載軟件及類庫(kù)
a)Flex2sdk: http://www.adobe.com/products/flex/ b)java 1.5 runtime: http://java./javase/downloads/index_jdk5.jsp 下面的Java Runtime Environment (JRE) 5.0 Update 10 c)在apache官方網(wǎng)站下載下載ant: http://www./dist/ant/binaries/ d)Microsoft .NET 1.1 SP1 framework(dotnetfx.exe): http://download.pchome.net/php/dl.php?sid=12854 e)flashdevelop2.0.2: http://www./downloads/releases/FlashDevelop-2.0.2-Final.exe f)flashplayer9的獨(dú)立運(yùn)行調(diào)試播放器: http://www.adobe.com/support/flashplayer/downloads.html 下面的Adobe Flash Player 9 — Debugger Versions (aka debug players or content debuggers) for Flex Developers 中的Download the Windows Flash Player 9 Projector content debugger (EXE, 2.67 MB) g)AS3 Intrinsic Classes(AS3基礎(chǔ)類): http://www./fdas3/ h)AS3 Top Level Declaration(AS3頂級(jí)聲明): http://www./downloads/releases/as3_toplevel.zip i)下載MXML語法schema文件:URL http:///downloads/Flex201_MXML_definition.zip j)下載flex2和AS3的ant模板工程(ANT-based project templates) http://www./flashdevelop/ProjectTemplates.zip 2.安裝軟件 a)下載flex2sdk后,解壓到C盤或者其他開發(fā)路徑下; b)安裝java1.5運(yùn)行時(shí)環(huán)境 c)安裝.net運(yùn)行時(shí)環(huán)境 d)右擊一個(gè).swf文件,選擇打開方式為flash player9.0 r28,這樣設(shè)置了swf文件運(yùn)行在調(diào)試版播放器下。 e)安裝flashdevelop2.0.2開發(fā)工具 3.配置環(huán)境 a)配置Flex2編譯器 - 檢查java1.5運(yùn)行時(shí)環(huán)境已經(jīng)安裝 - 選擇flashdevelop的Tools/Programming Settings,或者按F9,打開設(shè)置窗口,檢查ASCompletion.Flex2SDK.Path entry,設(shè)置(雙擊)它的值為flex2sdk的安裝目錄。 c)激活A(yù)S3自動(dòng)完成功能 -將下載的AS3_intrinsic_classes.zip解壓到任意目錄,或者放到flashdevelop的安裝目錄下。 - 選擇flashdevelop的Tools/Global Classpaths,或者按Ctrl+F9,打開全局類路徑窗口,增加一個(gè)全局類路徑,指向AS3_intrinsic_classes路徑。 d)除去AS2語法干擾 - 解壓as3_toplevel.zip到任意位置,或者放到flashdevelop的安裝目錄下。 - 在program settings中設(shè)置ASCompletion.Macromedia.Classpath為AS3 top-level路徑,設(shè)置ASCompletion.MTASC.UseStdClasses為false. d)激活MXML代碼自動(dòng)完成 - 將下載的Flex201_MXML_definition.zip解壓,將其中的XMLCompletion.xml放到C:\Program Files\FlashDevelop\Data\下面。 f)配置環(huán)境變量:set ANT_HOME=c:\ant set JAVA_HOME=c:\jdk1.2.2 set PATH=%PATH%;%ANT_HOME%\bin g)解壓模板工程,將05 AS3 Project和06 Flex 2 Project文件夾放到C:\Program Files\FlashDevelop\Data\ProjectTemplates下面。 h)關(guān)閉flashdevelop,并重新打開,使起設(shè)置生效。 4.測(cè)試開發(fā) a)測(cè)試MXML應(yīng)用 打開flashdevelop右下角的project面板,新建flex2工程,在app.mxml文件編寫組件,可以發(fā)現(xiàn)自動(dòng)完成功能非常好,輸入“>”自動(dòng)補(bǔ)齊上“/”。 雙擊build.xml文件,在command prompt進(jìn)行ant編譯部署時(shí),注意build.properties中flex2.dir的定義要指向flex2sdk的路徑,否則部署不成功。 b)剩下的就和danny的教程一樣了 http:///index.php/tutorials/free-flex2-development-environment/ 5. IDE下載 http://www./downloads/FlashDevelop_IDE_allInOne.rar |
|