http://www.flexrain.cn/flex/flex4-gumbo-fd.html#

FlashDevelop配置Flex4(gumbo)环境


效果预览:
<script type="text/javascript">&lt;!-- var flashvars = {}; var params = {menu: &quot;false&quot;,scale: &quot;noScale&quot;}; swfobject.embedSWF(&quot;/demo/flex4/flex4demo.swf&quot;, &quot;flex4demo&quot;, &quot;700px&quot;, &quot;200px&quot;, &quot;9.0.0&quot;,&quot;/js/expressInstall.swf&quot;, flashvars,params); // --&gt;</script>

<object id="flex4demo" style="visibility: visible;" width="700px" height="200px" data="/demo/flex4/flex4demo.swf" type="application/x-shockwave-flash"> <param name="menu" value="false"> <param name="scale" value="noScale"></object>

    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文件:
代码如下:

  1. <? xml version = " 1.0 " encoding = " utf-8 " ?>
  2. < Application   xmlns = " http://ns.adobe.com/mxml/2009 "
  3.         xmlns:mx = " http://ns.adobe.com/mxml/2009 "
  4.         xmlns:gumbo = " library:adobe/flex/halo "
  5.         preloader = " com.preload.PreLoad "  
  6.         backgroundColor = " 0x414141 " >  
  7.     <!--上面preload属性与下面外部CSS可以删除它-->  
  8.     < mx:Style   source = " yfskin/yflexskin.css " />  
  9.     <!--定义一个组-->
  10.     < Group   id = " group "
  11.             horizontalCenter = " 0 "
  12.             verticalCenter = " 0 " >
  13.         <!--定义一个方形-->
  14.         < Rect   id = " rect "
  15.                 width = " 320 "
  16.                 height = " 60 " >
  17.             <!--填充色-->
  18.             < fill >
  19.                 < SolidColor   color = " red " alpha = " 0.2 " />
  20.             </ fill >
  21.             <!--方框边框色与宽度-->
  22.             < stroke >
  23.                 < SolidColorStroke   color = " black " weight = " 4 " />
  24.             </ stroke >
  25.         </ Rect >
  26.         <!--定义文本-->
  27.         < TextGraphic   id = " textGraphic "
  28.                 horizontalCenter = " 0 "
  29.                 verticalCenter = " 0 "
  30.                 color = " #000000 "
  31.                 fontFamily = " Arial "
  32.                 fontWeight = " bold " >
  33.             <!--文本内容-->
  34.             < content > 你的Flash Player 10版本:{Capabilities.version} </ content >
  35.         </ TextGraphic >
  36.     </ Group >
  37.     <!--用mx命名添加控件-->
  38.     < mx:Label   text = " Hello World " />
  39.     <!--不用mx命名-->
  40.     < Label   text = " 欢迎使用Flex4 " />
  41. </ Application >
<!-- <a href="http://www.flexrain.cn/flex/flex4-gumbo-fd.html">详细阅读 &#187;</a> &#183; -->发表于: 02-06-09 · 1 评论 »  2,256 次阅读
<!-- You can start editing here. -->

1 评论 致 《FlashDevelop配置Flex4(gumbo)环境》

  1. keren 发表:

    关于支持中文的设置,您是怎么弄的呢?

    03月 31st, 2009 at 08:29

评论

姓名 *

邮箱 *

网站

<!-- <p><small><strong>XHTML:</strong> You can use these tags&#58; &lt;a href=&quot;&quot; title=&quot;&quot;&gt; &lt;abbr title=&quot;&quot;&gt; &lt;acronym title=&quot;&quot;&gt; &lt;b&gt; &lt;blockquote cite=&quot;&quot;&gt; &lt;cite&gt; &lt;code&gt; &lt;del datetime=&quot;&quot;&gt; &lt;em&gt; &lt;i&gt; &lt;q cite=&quot;&quot;&gt; &lt;strike&gt; &lt;strong&gt; </small></p> -->