您的位置:首页 > Web前端

新的起航即将开始,我前进的指引——Think Different

2012-01-10 11:23 344 查看
集成需要的工具
Flash Builder 4.6:https://a248.e.akamai.net/client.akamai.com/install/bin/user_client_win_345c617/installer_no_upload.exe?name=Adobe_Flash_Builder_4.6-AkamaiDLM.exe
eclipse 3.7:
http://mirror.bit.edu.cn/eclipse/technology/epp/downloads/release/indigo/SR2/eclipse-jee-indigo-SR2-win32.zip
flex sdk:
http://download.macromedia.com/pub/flex/sdk/flex_sdk_4.6.zip
eclipse wtp 插件:
http://mirror.bjtu.edu.cn/eclipse/webtools/downloads/drops/R3.3.2/R-3.3.2-20120210195245/wtp-R-3.3.2-20120210195245.zip
flex war file 和 eclipse+tomcat插件(有两个版本的)在 附件里有。

另外java ,jdk也需要配置好。

把工具都下下来。然后开始吧

1.sdk配置环境
解压Flex4SDK到 如 D:\flex
将D:\flex\bin加到,环境变量path里面
cmd 然后mxmlc -version 验证一下是否成功
D:\flex\runtimes\player\11.1\win 下InstallAX.exe,InstallPlugin.exe需要安装。
安装不成功的,把flash相关的程序关掉,不行重启在安装。

2.写个例子
如D;\apps\test.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="1024" minHeight="768">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
public function checkPass():void{
if(password.text.length<1)
Alert.show("Password Missing!");
else
Alert.show("Input Good!");
//trace(password.text);
}
]]>
</fx:Script>
<s:Group>
<s:layout>
<s:VerticalLayout/>
</s:layout>
<s:TextInput id="password"/>
<s:Button label="Password Submit!" fontSize="15" click="checkPass()" x="50" y="50"/>

<s:TextInput id="str1" x="50" y="50"/><s:TextInput id="str2" text="{str1.text}" x="70" y="70"/>
</s:Group>
<s:Button label="Password Submit!" fontSize="15"  x="120" y="40" id="bu1" click="bu1.x=150;bu1.y=80;"/>
</s:Application>

cmd-->cd apps-->mxmlc test.mxml
会在apps下生成一个test.swf。双击打开
3.安装flash builder,中英文都可以,中文的集成eclipse后,eclipse也会变成中文版
3.1.安裝时选它预设的 "试用" 安装
3.2.修改hosts 位于 C:\WINDOWS\system32\drivers\etc\hosts
加入
127.0.0.1 activate.adobe.com
127.0.0.1 practivate.adobe.com
127.0.0.1 ereg.adobe.com
127.0.0.1 activate.wip3.adobe.com
127.0.0.1 wip3.adobe.com
127.0.0.1 3dns-3.adobe.com
127.0.0.1 3dns-2.adobe.com
127.0.0.1 adobe-dns.adobe.com
127.0.0.1 adobe-dns-2.adobe.com
127.0.0.1 adobe-dns-3.adobe.com
127.0.0.1 ereg.wip3.adobe.com
127.0.0.1 activate-sea.adobe.com
127.0.0.1 wwis-dubc1-vip60.adobe.com
127.0.0.1 activate-sjc0.adobe.com
127.0.0.1 adobeereg.com
3.执行 Flash Builder
改点选输入序列号
1424-4938-3077-5736-3940-5640
1424-4827-8874-7387-0243-7331
(或是CS5.5的KeyGen产生的序列号)
3.4.随后要你输入你的 ADOBE ID (建议是选SKIP跳过)

4.集成flash builder和eclipse
Adobe Flash Builder 4.6\utilities下
Adobe Flash Builder 4.6 Plug-in Utility.exe打开,





eclipse版本要注意对应上图要求的
如果eclipse变成中文版的
在eclipse.ini加上
-Duser.language=en 中文版变成英文版
5.安装j2ee,wtp。
在eclipse根目录建立这两个文件夹



将wtp插件解压到myplugins/wpt目录下
在links下,新建wtp.links文件,内容如下
path=myplugins\\wtp

6.打开eclipse新建flex project





target runtime 需要new一个
war file就是附件里的那个blazeds.war文件
然后finnish
7.tomcat插件放到eclipse的plugins下就可以了。
就到这里吧,后面的再补充。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: