2007-01-18
Flex之Hello World
关键字: flex
一,到sun网站下载并安装jdk-6-windows-i586.exe并安装
安装完将%JAVA_HOME%\bin加入你的系统path环境变量中去
二,到adobe网站下载flex_sdk_2.zip
解压,然后将%FLEX_HOME%\bin加入path
三,运行%FLEX_HOME%\samples\build-samples.bat
然后可以用%FLEX_HOME%\player\debug\下的FlashPlayer或者IE来参看%FLEX_HOME%\samples\下的几个demo,其中explorer下面的explorer.swf是各个component的示例和MXML代码
四,在任意目录下建立hello.mxml
然后cmd切换到当前目录并运行
当前目录就生成了你的hello.swf文件
你可以用FlashPlayer来查看它,也可以写一个html来查看它,如hello.html
安装完将%JAVA_HOME%\bin加入你的系统path环境变量中去
二,到adobe网站下载flex_sdk_2.zip
解压,然后将%FLEX_HOME%\bin加入path
三,运行%FLEX_HOME%\samples\build-samples.bat
然后可以用%FLEX_HOME%\player\debug\下的FlashPlayer或者IE来参看%FLEX_HOME%\samples\下的几个demo,其中explorer下面的explorer.swf是各个component的示例和MXML代码
四,在任意目录下建立hello.mxml
<?xml version="1.0"?>
<!-- Simple example to demonstrate the Alert control. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
]]>
</mx:Script>
<mx:Panel title="Hello, flex!" width="100%" horizontalAlign="center">
<mx:Button label="Click Me" click="Alert.show('Hello flex, I am coming!', 'Hello, flex!');"/>
</mx:Panel>
</mx:Application>
然后cmd切换到当前目录并运行
mxmlc hello.mxml
当前目录就生成了你的hello.swf文件
你可以用FlashPlayer来查看它,也可以写一个html来查看它,如hello.html
<body bgcolor="white"> <embed src="hello.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="120" menu="false" quality="high"></embed> </body>
发表评论
- 浏览: 723121 次
- 性别:

- 来自: BJ

- 详细资料
搜索本博客
我的相册
screenshot
共 1 张
共 1 张
最近加入圈子
最新评论
-
Why OO sucks
看成去QQ SUCK 了
-- by xhanxhanxhan -
Rails的富文本编辑器插件 ...
有没有那个像textmate那种语法高亮的富文本编辑器?
-- by zllicho -
翻译www.djangobook.com之 ...
weiertzw 写道 1. >>> from django. ...
-- by chenjihua75 -
PHP、CakePHP哪凉快哪呆 ...
这孩子被java毒害太深。。。跳出java,你会发现外面的世界真的很大。
-- by woodless -
学习svn命令
只会用 apt-get 不是好孩子。
-- by smartly






评论排行榜