存档

2009年9月 的存档

(转)AIR 2.0的三个新特性!

2009年9月29日 评论已被关闭

来至:http://swfever.com/?p=341

不知道有多少人注意到了Mike Chambers最近放出的讲稿Advanced Desktop Development with Adobe AIR中其实透露了部分AIR 2.0的新特性内容。反正我是没有注意到,但是Lee Brimelow注意到了,所以我忙不迭的下载并阅读了那篇讲稿。是的,我现在的心情和Lee Brimelow一样,那就是:很高兴我们终于可以放出一些AIR 2.0令人兴奋的新特性了!

这里我简单介绍一下Mike Chambers讲稿中所提及的三个AIR 2.0的新特性,更多新特性会在Adobe MAX 09大会上发布。届时会为大家提供更多的信息。

AIR 2.0新特性之一:存储器(Storage Volume)监听

AIR 2.0提供了对系统的存储器信息访问和监听的API。通过这些API,你不仅可以访问到硬盘文件系统,同时还可以监听通过USB或火线进行连接的移动存储设备,例如移动硬盘和以存储方式连接到计算机的相机,MP3或手机等等。
你可以通过对系统存储器信息添加监听器来监听这些外部设备的连接、断开状态。
代码示例:

StorageVolumeInfo.storageVolumeInfo.addEventListener(StorageVolumeChangeEvent.STORAGE_VOLUME_MOUNT, onStorageVolumeMount);
StorageVolumeInfo.storageVolumeInfo.addEventListener(StorageVolumeChangeEvent.STORAGE_VOLUME_UNMOUNT,onStorageVolumeUnmount);

AIR 2.0新特性之二:使用操作系统默认应用程序打开文件

AIR 2.0提供了非常简单易用的API让你使用操作系统所定义的关联应用程序打开文件。用法如下:

var file:File = File.desktopDirectory.resolvePath("Temp.txt");
file.openWithDefaultApplication();

这使得使用AIR开发基于“文件管理器”的应用称为可能。

AIR 2.0新特性之三:与本地进程(应用程序)进行通讯!

毫不夸张的说,这是最让我感到兴奋的AIR 2.0新特性之一,因为它意味着将AIR应用的功能无限扩展化。举个例子来说,你可以将Windows命令行程序(cmd.exe)通过AIR应用封装起来,并指挥它做任何你想做的事情。
AIR2.0与本地进程的交互主要体现在以下几方面:

  • 启动进程并提供初始参数
  • 向进程写入数据
  • 读取进程的输出数据

以下是一个例子:

private var nativeProcess:NativeProcess = new NativeProcess();
private var npsi:NativeProcessStartupInfo = new NativeProcessStartupInfo();
 
var file:File = File.desktopDirectory.resolvePath("executable.exe");
npsi.executable = file;
npsi.workingDirectory = File.desktopDirectory;
var args:Vector.<String> = new Vector.<String>;
args.push("-key");
args.push("value");
npsi.arguments = args;
nativeProcess.start(npsi);

当然,Adobe始终把平台运行时的安全因素放在首位。如果你希望你的AIR应用能有与本地进程交互,需要注意以下限制:

  • 必须通过操作系统的安装工具来部署,不能直接使用AIR包进行安装(AIR是跨平台的文件格式)。
  • 不能启动位于当前AIR应用程序文件夹中的进程。
  • 必须在AIR应用程序描述文件指明supportProfiles为extendedDesktop(或使用AIR命令行工具指明该参数)。

关于如何通过操作系统本地的安装工具来部署AIR应用,这次的MAX大会上将有专题介绍。

分类: AIR 标签:

可以把javaScript嵌入到swf里了

2009年9月27日 评论已被关闭

来至:http://flash.9ria.com/viewthread.php?tid=36943

flex 开发者应该对使用Embed元数据标签嵌入各种资源都很熟悉了,现在在flash cs4中同样可以使用元数据标签进入嵌入资源了
  好多人应该还不知道竟然可以将javaScript库嵌入到swf从而使在swf可以写html DOM,而最终部署的时候这个js文件不需要暴露出来
  这个技术其实很简单,基础就是用[Embed()]标签将js文件嵌入到库中,然后声明一个Class绑定到该资源,在实例化的时候将该引用的字符串发送javaScript的eval声明就可以,以下是一个简单的实例:

  1. JavaScript:
  2.       function hello()
  3.       {
  4.            alert(“hello”);
  5.       }

复制代码

  1. package
  2. {
  3.         import flash.display.Sprite;
  4.         import flash.external.ExternalInterface;
  5.         public class EmbeddedJavaScriptExample extends Sprite
  6.         {
  7.                 [Embed(source="hello.js", mimeType="application/octet-stream")]
  8.                 private static const HelloJS:Class;
  9.                
  10.                 public function EmbeddedJavaScriptExample()
  11.                 {
  12.                         execute();
  13.                        
  14.                 }
  15.                 public function execute():void{
  16.                         if (ExternalInterface.available)
  17.             {
  18.                 // embed the JavaScript to the page
  19.                 ExternalInterface.call(“eval”, new HelloJS().toString());
  20.                
  21.                 // the embedded JavaScript has a function call named hello
  22.                 // now that it has been embedded to the page call it
  23.                 ExternalInterface.call(“hello”);
  24.             }
  25.                 }
  26.         }
  27. }

复制代码

分类: Flex 标签:

Squiggly-基于Flash/AIR的拼写检查引擎

2009年9月23日 评论已被关闭

传说中的Flash cs5

2009年9月22日 评论已被关闭
分类: 生活杂谈 标签:

火柴多人在线平台

2009年9月19日 评论已被关闭

看了几天的AFCS自带文档,终于学有所成了-_-||,成果在下面^_^

-_名字取得有点….咯……

任意填写一个用户名登录即可

此作品是基于AFCS构建的,大体框架已成雏形。
里面放了一个简易版的游戏–对对碰游戏引用网络上的一个,不知作者是谁喽。
基本上的通讯已解决,在对对碰游戏消除一行后,上面随机图案,暂时还没有发送到对方的显示中去,不影响游戏进行。

功能:

  • 多人在线聊天
  • 目前只添加了一个游戏,支持两人对战(游戏内容有待后期丰富)

后面打算加入的功能:

  • 游戏列表,可自由选择玩哪一个游戏
  • 玩家音视频功能
  • 玩家详情
  • 好友功能

点击登录

用Flex开发的企业架构应用-视频演示

2009年9月17日 评论已被关闭

详细介绍

长达6分钟的视频演示(如果缓冲的慢的话,请先冲一冲-_-)

分类: Flex 标签: ,

分享好用的屏幕录制成flash格式的好软件

2009年9月16日 评论已被关闭

分享好用的屏幕录制成flash格式的好软件

Instant Demo Pro 是一款屏幕动作录制工具,可以帮助你创建你软件的演示和手册等,可输出为 Flash 格式,还可以录制声音注解,并在编辑期间插入注解其其他声音文件等。Instant Demo 生成的文件尺寸比较小。

      2008年9月18日澳大利亚 NetPlay 软件公司发布了 Instant Demo v7.0,7.0 版本引入了变焦和摇摄功能,在较小屏幕上重放时,也能提供完整的视觉清晰度。 Instant Demo v7.0 同时采用了高品质视频的AVI格式,文字转换语音技术,背景声音自动音量控制和五个全新的可定制的播放控制风格。

      试用后,感觉 Instant Demo 非常不错,属于那种短小精悍型的工具,麻雀虽小五脏俱全,Instant Demo 有很多选项足够你折腾、自定义的,充分满足你的定制要求。添加注解的方式也很特别,可以拖动时间轴并在不同位置添加,如文本、鼠标点击风格等,还有 Instant Demo 提供的影片合并功能也不错,其他就等你自己发现了。

破解版下载

分类: 生活杂谈 标签:

Flex 4 预览版特性及怎样迁移Flex 3 应用

2009年9月15日 评论已被关闭
分类: 生活杂谈 标签:

10件高级Flash开发者应该知道的事

2009年9月13日 评论已被关闭

原文:http://pv3d.org/2009/08/28/10-things-every-senior-flash-developer-should-know/

I’ve interviewed quite a few Flash/Flex developers as potential employees for Roundarch. The hard part for me is knowing exactly what questions to ask to be able to gauge a Flash dev’s skill level.

So, I made a list. From my experience this list allows me to judge the skill level and experience of the devs I interview.

If you’re not quite “Senior” level yet, read through the list and study up from the links. If this stuff is “old hat” to you, please critique this list add more references in the comments.

1.      The Elastic Racetrack
You need to understand when events fire, when code is executed, and when the player renders. It’s really the foundational concept of Flash Player.
http://www.craftymind.com/2008/04/18/updated-elastic-racetrack-for-flash-9-and-avm2/

2.      FlexSDK, mxmlc, compc, and all that jazz
You need to know what’s going on when you hit that “run” button in Eclipse.
http://www.senocular.com/flash/tutorials/as3withmxmlc/
http://livedocs.adobe.com/flex/3/html/help.html?content=apparch_08.html

3.      Player Events, Custom Events, Event Bubbling
I can’t imagine where flash player would be without frames and mouse clicks.
http://www.adobe.com/devnet/actionscript/articles/event_handling_as3_03.html
http://livedocs.adobe.com/flex/3/langref/flash/events/package-detail.html
http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/
http://jacwright.com/blog/70/how-to-listen-to-flash-events-that-dont-bubble/

4.      Statements, Keywords, and Directives
You should never be surprised by a new “word” in as3. If you don’t know what “static” or “override” or others are, learn them.
http://livedocs.adobe.com/flex/2/langref/statements.html

5.      ASDoc
Someday, you’ll re-read your code and have no idea what it does. The stress here is on proper documenting, but generating asdocs is nice too.
http://livedocs.adobe.com/flex/3/html/help.html?content=asdoc_3.html

6.      Managing visual assets (images, fonts, CSS, etc)
Flash is visual. So you need to know how to manage assets with code.
http://www.gskinner.com/talks/flexlovesflash/
http://code.google.com/p/queueloader-as3/
http://code.google.com/p/bulk-loader/

7.      Arrays, Collections, Dictionaries, Mapping
You’re not just working with one MovieClip here, so you need to know how to control multiple objects at once.
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Array.html
http://www.gskinner.com/blog/archives/2006/07/as3_dictionary.html
http://code.google.com/p/as3ds/

8.      Programmatic motion (tweening, easing)
If you wanted things to stay still, you should’ve stuck with HTML
http://blog.greensock.com/tweenmaxas3/
http://www.amazon.com/Foundation-Actionscript-3-0-Animation-Making/dp/1590597915/ref=sr_1_1?ie=UTF8&s=books&qid=1243014431&sr=8-1

9.      OOP and Coding Against Frameworks
The days of a one huge .as file are over. You need to smartly move your code into organized and reusable objects. Also, now there are plenty of popular as3 frameworks to help manage your code. Read up on them and start using one.
http://www.adobe.com/devnet/actionscript/articles/oop_as3.html
http://www.actionscript.org/resources/articles/684/1/Object-Oriented-Programming-in-AS3/Page1.html

10.  Version control
Unless you think your code is worthless, you need to learn how to back it up properly.
http://tortoisesvn.net/downloads
http://versionsapp.com/
http://en.wikipedia.org/wiki/Revision_control
http://git-scm.com/
http://www.nongnu.org/cvs/

分类: 生活杂谈 标签: ,

Adobe ADC Flex和Coldfusion开发中心中文文章更新

2009年9月13日 评论已被关闭
分类: Flex 标签: ,