九色国产,午夜在线视频,新黄色网址,九九色综合,天天做夜夜做久久做狠狠,天天躁夜夜躁狠狠躁2021a,久久不卡一区二区三区

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
Free Flex2 Development Environ...

Posted on December 30th, 2006 by DannyT.
Categories: Uncategorized.

This is certainly not anything groundbreaking, however I thought it might be useful to offer a step by step guide to getting up and running for Flex2/AS3 development without spending a bean on software*.

*N.B. gaping flaw in comment: you will however need Windows to do all of this which is of course not free. Unfortunately this tutorial is for setting up a Flex2/AS3 development environment for Windows. I might get around to exploring a similar setup on Linux but at the moment this is my preferred setup as FlashDevelop will only run on Windows.

This tutorial is essentially an idiot proofing of the (already fairly idiot proof) instructions on FlashDevelop.org. However, I originally struggled with this and know of a few others who have also, so dont feel bad if you‘re reading this having struggled elsewhere (it‘s easy when you know how eh? I dont really think you or I am an idiot). This tutorial is aimed at those wishing to get into some Flex2/AS3 development but haven‘t had a chance to do much yet.

The Environment
We are going to step through the setup of our development environment and build a hello world Flex2/AS3 application using the following:

Pre-requisites
Before anything will work you‘ll need to make sure you have a couple of things installed. Firstly check you have the Microsoft .NET 1.1 SP1 framework if not you need to download Microsoft .NET 1.1 SP1 framework.
Secondly you‘ll need the flash player for Internet Explorer and it‘s worth getting the "projector content debug release" for ease of testing (saves having to open IE everytime you want to test) visit the Adobe Flash Player download page for these. Once downloaded, right click on a .swf file, select Open With and select "Flash Player 9 r28", this will mean when you test your movies they‘ll run in the standalone player.
You will also need the java 1.5 runtime installed (to check your version click Start, Run, type "cmd" hit enter, type "java -version" hit enter). That should hopefully be everything you need to complete the rest of this tutorial.

Installing FlashDevelop
The first step is to install FlashDevelop, download it from FlashDevelop.org in the "Releases" forum, this tutorial is written at the time of release 2.0.2 (so don‘t blame me if things change for later versions). Run the installer and follow along as you would any other install.

NOTE: by default FlashDevelop comes ready to run for AS2 projects. If you plan to do AS2 and AS3 development (as I do) I would suggest changing the installed path to "C:\Program Files\FlashDevelop_AS2" or wherever you wish to install it, we will make a duplicate for Flex2/AS3 projects shortly. If you plan on using Flex2/AS3 only then ignore this comment.

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????
Ah yes, that‘s what we‘re here for isn‘t it? As noted above, if you plan on doing AS2 development in FlashDevelop as well as AS3, I would recommend making a copy of the Program Files folder you originally installed FlashDevelop to. I made a copy to C:\Program Files\FlashDevelop_AS3, this means you can switch seemlessly between the two without having to change classpaths or settings. If you only plan to do Flex2/AS3 then carry on as you are.

Flex2 SDK
If you don‘t already have it, download the Flex2 SDK from Adobe and extract it somewhere on your PC (I extracted to c:\Flex2\flex_2_sdk). We now need to tell FlashDevelop where it is, look for a file called settings.xml in C:\Program Files\FlashDevelop_AS3\Settings\ (you might need to run FlashDevelop.exe and close it before settings.xml is created) (edit: thanks Phillipe) In FlashDevelop click Tools, Program Settings (or press F9) and make sure that the key ASCompletion.Flex2Sdk.Path has the correct path to the flex2 sdk we extracted earlier. This has now enabled the Flex2 mxmlc compiler.

AS3 Code Completion
In order to have the AS3 intellisense and code completion you‘ll need to download the AS3 Intrinsic Classes and extract them anywhere (I chose C:\Flex2\AS3_intrinsic_classes). Now open FlashDevelop and press Ctrl + F9 to open the global classpaths dialog, add the path to the AS3 intrinsic classes and close FlashDevelop.
Because we‘re using this setup for Flex2/AS3 development only we now need to remove all AS2 reminants. To do this download the AS3 top-level declaration and extract anywhere (except for in the AS3 intrinsic classes folder, I chose C:\Flex2\as3_toplevel). Open FlashDevelop and hit Ctrl+F9 again to open the global classpath dialog and remove the first classpath (%userprofile%\Local Settings\Application Data\Macromedia\Flash MX 2004\en\Configuration\Classes).
Now go to program settings (F9) and set the ASCompletion.Macromedia.Classpath key to the path of the as3 top level declarations (in my case C:\Flex2\as3_toplevel) and also set the ASCompletion.MTASC.UseStdClasses key to false.

MXML completion
The final step is to enable MXML completion. To do this download the MXML definition and extract it to your FlashDevelop‘s data folder (in my case C:\Program Files\FlashDevelop_AS3\Data).

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
Open FlashDevelop (make sure you open the FlashDevelop.exe in your FlashDevelop_AS3 folder if you kept an AS2 version).
Click Project,
Click New Project,
Select Empty Project,
Enter the project name "HelloWorldAS3" and choose where you want the project created.
You should see in the right hand project explorer a panel with your project file,
right click that and select Add, New Class
Enter the class name "HelloWorld" click OK,
Your HelloWorld Class will appear,
Click Syntax, AS3. You can test this now by typing the following:

Actionscript:
  1. package
  2. {
  3.     import flash.display.Sprite;
  4.     import flash.text.TextField;
  5.    
  6.     public class HelloWorld extends Sprite
  7.     {
  8.         function HelloWorld()
  9.         {
  10.             var t:TextField = new TextField();
  11.             t.text = "HelloWorld!";
  12.             addChild(t);
  13.         }
  14.     }
  15. }

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
Now we all know AS3 isn‘t Flex2 and Flex2 isn‘t AS3, it all comes together when we introduce MXML, Flex2‘s markup language. Fortunately we‘ve just setup a very cool environment for creating this very thing, so without further ado:
Open FlashDevelop if it‘s not already running,
Click Project, New Project
Select Empty Project
Name the project "HelloWorldMXML", choose where you wish it to save and click OK,
In the project explorer on the right, right click HelloWorldMXML and select Add, New Xml File...
Name the file "HelloWorld.mxml" and click OK,
Now type the following into your mxml file:

XML:
  1. <mx:Application
  2.     xmlns:mx="http://www.adobe.com/2006/mxml"
  3.     horizontalAlign="center" verticalAlign="center"
  4.     >
  5.     <mx:HBox>
  6.         <mx:Label id="myLabel" text="Wooo a label!"  />
  7.         <mx:Button id="myButton" label="I‘m a button!" />
  8.     </mx:HBox>
  9.    
  10. </mx:Application>

Again, you should notice you have mxml intellisense and code completion making it a breeze to knock up an mxml layout.
Once done click the Quick MTASC Build button and whoosh, you should see your first Flex2 swf created and displayed. If so well done, if not post a message or hit the forums.

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.
 
 

搭建免費的flex2&as3開發(fā)環(huán)境:flashdevelop2.0.2

1.下載軟件及類庫
a)Flex2sdk: http://www.adobe.com/products/flex/
b)java 1.5 runtime: http://java.sun.com/javase/downloads/index_jdk5.jsp
下面的Java Runtime Environment (JRE) 5.0 Update 10
c)在apache官方網(wǎng)站下載下載ant: http://www.apache.org/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.flashdevelop.org/downloads/releases/FlashDevelop-2.0.2-Final.exe
f)flashplayer9的獨立運行調(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.returnundefined.com/fdas3/
h)AS3 Top Level Declaration(AS3頂級聲明): http://www.flashdevelop.org/downloads/releases/as3_toplevel.zip
i)下載MXML語法schema文件:URL http://timwalling.com/downloads/Flex201_MXML_definition.zip
j)下載flex2和AS3的ant模板工程(ANT-based project templates) http://www.bit-101.com/flashdevelop/ProjectTemplates.zip

2.安裝軟件
a)下載flex2sdk后,解壓到C盤或者其他開發(fā)路徑下;
b)安裝java1.5運行時環(huán)境
c)安裝.net運行時環(huán)境
d)右擊一個.swf文件,選擇打開方式為flash player9.0 r28,這樣設(shè)置了swf文件運行在調(diào)試版播放器下。
e)安裝flashdevelop2.0.2開發(fā)工具

3.配置環(huán)境
a)配置Flex2編譯器
- 檢查java1.5運行時環(huán)境已經(jīng)安裝
- 選擇flashdevelop的Tools/Programming Settings,或者按F9,打開設(shè)置窗口,檢查ASCompletion.Flex2SDK.Path entry,設(shè)置(雙擊)它的值為flex2sdk的安裝目錄。

c)激活A(yù)S3自動完成功能
-將下載的AS3_intrinsic_classes.zip解壓到任意目錄,或者放到flashdevelop的安裝目錄下。
- 選擇flashdevelop的Tools/Global Classpaths,或者按Ctrl+F9,打開全局類路徑窗口,增加一個全局類路徑,指向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代碼自動完成
- 將下載的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.測試開發(fā)
a)測試MXML應(yīng)用
打開flashdevelop右下角的project面板,新建flex2工程,在app.mxml文件編寫組件,可以發(fā)現(xiàn)自動完成功能非常好,輸入“>”自動補齊上“/”。
雙擊build.xml文件,在command prompt進行ant編譯部署時,注意build.properties中flex2.dir的定義要指向flex2sdk的路徑,否則部署不成功。
b)剩下的就和danny的教程一樣了 http://danny-t.co.uk/index.php/tutorials/free-flex2-development-environment/


5. IDE下載
http://www.openria.cn/downloads/FlashDevelop_IDE_allInOne.rar

本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
FlashDevelop AIR配置及生成
搭建Android開發(fā)環(huán)境 - Android - mobile - JavaEye論壇
最新Android 4.x 搭建開發(fā)環(huán)境
Win7 配置Android開發(fā)環(huán)境
Android環(huán)境的構(gòu)建
windows 7下搭建android開發(fā)環(huán)境步驟圖解
更多類似文章 >>
生活服務(wù)
熱點新聞
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服