http://www.flexrain.cn/flex/flex4-gumbo-fd.html#
FlashDevelop配置Flex4(gumbo)环境
效果预览:
<script type="text/javascript"><!--
var flashvars = {};
var params = {menu: "false",scale: "noScale"};
swfobject.embedSWF("/demo/flex4/flex4demo.swf", "flex4demo", "700px", "200px", "9.0.0","/js/expressInstall.swf", flashvars,params);
// --></script>
Flex4(Gumbo)都推出一段时间了.因为我用的IDE是FlashDevelop,所以我把配置过程写写!因为SDK
的版本更新频率高,所以大家要注意,毕竟还没出正式版!做了个Demo新的语法,又要开始学习了!例子里的命名空间变化了,在FD里新建mxml文件后记
得修改原来的,好了,开始Flex4(Gumbo)之旅吧!!
配置过程很简单的:
所需要的软件
一、FlashDevelop软件:
下载:http://www.flashdevelop.org/community/viewforum.php?f=11
二、Flex4 SDK:
下载: http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4/
三、Flash Player 10:
下载:http://www.adobe.com/support/flashplayer/downloads.html
配置步骤:
安装好Flashdevelop后,并解压Flex4 SDK到目录,安装好Flash Player 10,然后选择菜单:Tools->Program Setting… 如下图:
然后新建Flex项目,再右击项目名选择Properties…属性,设置如图:
好了新建一个HelloWorld.mxml文件:
代码如下:
- <? xml version = " 1.0 " encoding = " utf-8 " ?>
- < Application xmlns = " http://ns.adobe.com/mxml/2009 "
- xmlns:mx = " http://ns.adobe.com/mxml/2009 "
- xmlns:gumbo = " library:adobe/flex/halo "
- preloader = " com.preload.PreLoad "
- backgroundColor = " 0x414141 " >
- <!--上面preload属性与下面外部CSS可以删除它-->
- < mx:Style source = " yfskin/yflexskin.css " />
- <!--定义一个组-->
- < Group id = " group "
- horizontalCenter = " 0 "
- verticalCenter = " 0 " >
- <!--定义一个方形-->
- < Rect id = " rect "
- width = " 320 "
- height = " 60 " >
- <!--填充色-->
- < fill >
- < SolidColor color = " red " alpha = " 0.2 " />
- </ fill >
- <!--方框边框色与宽度-->
- < stroke >
- < SolidColorStroke color = " black " weight = " 4 " />
- </ stroke >
- </ Rect >
- <!--定义文本-->
- < TextGraphic id = " textGraphic "
- horizontalCenter = " 0 "
- verticalCenter = " 0 "
- color = " #000000 "
- fontFamily = " Arial "
- fontWeight = " bold " >
- <!--文本内容-->
- < content > 你的Flash Player 10版本:{Capabilities.version} </ content >
- </ TextGraphic >
- </ Group >
- <!--用mx命名添加控件-->
- < mx:Label text = " Hello World " />
- <!--不用mx命名-->
- < Label text = " 欢迎使用Flex4 " />
- </ Application >
关于支持中文的设置,您是怎么弄的呢?
03月 31st, 2009 at 08:29