Flex 复制内容到粘贴板 Set System Clipboard

Categories: Flex; Tagged with: ; @ October 16th, 2010 12:02

Use:  System.setClipboard(lastShortUrl);

直接Call时, 报错:

Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press.
    at flash.system::System$/setClipboard()

只好加一个"复制"按钮, 在ButtonHandler中set clipboard – 不友好啊不友好…

Flex中使用鼠标状态忙 Set Cursor Busy in Flex

Categories: Flex; Tagged with: ; @ October 16th, 2010 11:43

一直没用过鼠标状态, 都是在忙的时候disable控制UI, 忙完了再enable.  某天看Flex Test Drive, 看上去很好啊:
但是虽然鼠标忙, 但仍旧可以使用, 因此说看上去很美 —- 所以你还是要对控制UI进行Enable/Disable

设置鼠标忙: CursorManager.setBusyCursor();
重置忙状态: CursorManager.removeBusyCursor();

See API: http://help.adobe.com/zh_CN/AS3LCR/Flex_4.0/mx/managers/CursorManager.html

Opensource.adobe.com宕机 恢复时间未定

Categories: Flex; Tagged with: ; @ October 15th, 2010 19:26

今天Adobe高级产品经理Deepa Subramaniam在Flex Team Blog上称"Adobe Open Source 已经宕机一段时间了…"

Some of you may have noticed that Adobe Open Source has been down for some time. The service is currently unavailable as we investigate a critical issue with our server infrastructure. We currently do not have an ETA on restoring service, but I will share more information as it becomes available. I sincerely apologize for this inconvenience.

大概feeds.adobe.com与open source也在一个服务器上, 前几天发现博客上引用的logo断了…What Happened?

无独有偶, 下午看国内Flex开发社区 纬度网 http://wedoswf.com/ 竟然也宕机, 费解. 纬度网的宕机说明:

We’re sorry, but something went wrong.
We’ve been notified about this issue and we’ll take a look at it shortly.

更让人费解的是我平时基本上很少上这些技术站, 最近我发奋图强更新了点知识, 这些网站就扛不住了, 纷纷宕机,  成年人学习点新东西真不容易啊….

Flash Builder (5?) "Burrito(玉米煎饼)” / Flex SDK betas 即将发布

Categories: Flex; Tagged with: ; @ October 12th, 2010 16:19

今年5月我们才从FlexBuilder3迁移到FlashBuilder4, SDK目前仍维持在3.5, 仅在部分小应用中使用了SDK4.0。今天收到邮件提醒已可申请”Burrito”的试用: “The Flash Builder “Burrito” / Flex SDK betas are being opened up…”, 查了下更新的内容, 并不是很多.burrito

(more…)

使用ANT Build SWC

Categories: Flex; Tagged with: ; @ October 11th, 2010 20:59

两年前刚开始学Flex的时候常去看Cookbook, 还翻译过一篇关于生成SWC文件的帖子—当时甚至连ANT都没有用过, 真TM是为赋新词强说愁, 闲的肱二头肌疼, 再上层楼, 用了ANT, 写过几个Build才知道, 除了使用了装B武器之外, 我仍旧一无是处.

使用Adobe提供的compc – component compiler来打包as文件, 使用ANT编写极为简单, 如下:

<!– =================================
target: Build SWC文件举例 – 极不实用.
================================= –>
<target name=”buildSWCTest” depends=”” description=”Build Athena Framework SWC file.”>
<compc output=”$E:/test.swc”
include-classes=”com.liguoliang.Class1 com.liguoliang.Class2″>
<source-path path-element= “E:/Projects/FLEX/TestApp/src” />
</compc>
</target>

compc要求使用include-classes指定参与打包的Class, 一个半个类倒也无所谓, 一个个写上就可以了, 但问题是成百上千个, 写的完也写乱套了. 于是出现如下ANT命令, 帮助生成指定目录下的所有AS Class的PackageName:

注意: 部分变量定义没贴出来. 领会意思就ok.

<fileset dir=”${src-dir}” id=”src.files“>
<include name=”**\**”/>
</fileset>

<echo message=”${src-dir}” />
<pathconvert
property=”build-classes
pathsep=” ”
dirsep=”.”
refid=”src.files
>
<map from=”\” to=”/”/>
<map from=”${src-dir}/” to=””/>
<mapper>
<chainedmapper>
<globmapper from=”*.as” to=”*”/>
<!–globmapper from=”*.mxml” to=”*”/–>
</chainedmapper>
</mapper>
</pathconvert>

<echo message=”Class is set to: ${build-classes}”/>

使用$build-classes作为compc的include-classes的Value再进行Build就可.

另: 可在compc中, 可使用external-library-path增加外部SWC:
<external-library-path file=”somdir/common.swc” append=”true”/>

See:
1. Using the compc task
2. Using compc, the component compiler
3. Working with compiler options – 同时适用于mxmlc与compc
4. Flex compc & ant 编译

Newer Posts <-> Older Posts



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.