Seven Yu @ 06/27/2008 (11:25 am)

Adobe AIR: Create – Modify – Reuse

Tags: , , ::

书名: Adobe AIR: Create – Modify – Reuse
作者: Marc Leuchner, Todd Anderson, Matt Wright
出版: Wiley Publishing, Inc.
ISBN: 978-0-470-18207-9
格式: pdf
页数: 457
大小: 5.30M

下载: Adobe AIR: Create – Modify – Reuse

Seven Yu @ 06/17/2008 (10:07 pm)

AIR 1.1 更新(支持简体中文)

Tags: , , ::

相关链接:http://www.adobe.com/go/air/

今天,Adobe提供AIR1.1的新版本下载,在此新版本中,有以下增强和支持:

多语言版本UI界面支持,包括简体中文,繁体中文,韩文,俄文,日文,法文,德文,意大利语,西班牙语和葡萄牙语支持
提升了对于企业部署的强壮性和统一性
支持应用认证的整合方法
内存和性能提升等

转自:7Yue’s Weblog

Seven Yu @ 05/22/2008 (10:10 pm)

很酷的一套 Flex/AIR 皮肤 (KingnareStyle)

Tags: , , , , ::

原文地址: http://www.kingnare.com/auzn/article.asp?id=139

元件都在swf文件中,不过有几个如ComboBox有下拉箭头的组件可能会因为高度变化,箭头也跟着发生形变.
用ClassReference引用com.kingnare.skins路径下的几个类,,就能解决这问题了.
在样式表中两种引用都有,其中使用SWF元件的部分被注释掉了,你想用哪种,就看自己的喜好了.

因为是黑色系样式,使用时将背景色设置为#333333(0×333333),能获得较好的视觉效果.

Demo地址:KingnareStyle Demo
(由于含大量的组件,加载时间可能比较长,请耐心等待)

样式下载地址(此版本不含fla源文件,目前在整理中,下版本释出):
http://code.google.com/p/kingnarestyle

Seven Yu @ 04/27/2008 (9:31 pm)

101 Adobe AIR Resources to Add to Your Toolbelt of Awesomeness

Tags: , , ::

原文地址: http://www.jasonbartholme.com/101-adobe-air-resources-to-add-to-your-toolbelt-of-awesomeness/

Adobe AIR logoThe Adobe Integrated Runtime or AIR is a runtime environment for developing rich Internet applications. These applications can be deployed as a desktop applications. AIR applications can operate offline and can take advantage of additional functionality when connected to the Internet.

Getting Started

The Adobe AIR Page – adobe.com
Adobe AIR Language Reference for HTML Developers – adobe.com
Dreamweaver CS3 Extension – adobe.com
Developing Adobe AIR Applications with HTML and Ajax – adobe.com

Application Collections

10 Adobe AIR Must See Applications – webresourcesdepot.com
Adobe AIR Applications Wiki – pbwiki.com
Adobe AIR Marketplace – adobe.com
AIR Projects on RIAForge – riaforge.org
AIRpollo – apollohunter.com
O2Apps – o2apps.com

Articles

6 Adobe AIR ActionScript APIs explored, first up File System Access – seantheflashguy.com
6 Adobe AIR ActionScript APIs explored part II: Network Detection – seantheflashguy.com
Adobe AIR Apps Bloggers Will Love - readwriteweb.com
Adobe AIR is Killing Google Gears – whydoeseverythingsuck.com
Adobe AIR Resources for the Ajax Developer – snook.ca
Adobe AIR security concerns - itwriting.com
Adobe AIR vs Microsoft Silverlight: A developer’s perspective – blogspot.com
Adobe AIR/Apollo vs Ajax vs Gears vs Flash vs Silverlight vs JavaFX vs GWT - rdews.com
Adobe AIR: 10 reasons to love it, 10 reasons to hate it. – itwriting.com
AIR Goes Live: The Best Things About Adobe’s AIR Platform – readwriteweb.com
Building a visual performance app with Adobe AIR, Flex, and Flash – adobe.com
Comparing Adobe Flex and Ajax development models – adobe.com
Dealing with Asynchronous Queries in Adobe AIR – alternateidea.com
Introduction to SQLite in Adobe AIR – peterelst.com
Most of the Brands are using Adobe AIR applications – developersnippets.com
Query a Local Database in AIR’s Desktop RIA Environment – devx.com
Super-simple SQLite example for Adobe AIR 1 Beta
Tips on getting a code signing certificate – macromedia.com
Using SQL with Adobe AIR – macromedia.com
You Too, Can be an AIR Developer! – blogspot.com

Bloggers

Christian Cantrell – macromedia.com
Daniel Dura – danieldura.com
Ethan Malasky – macromedia.com
Kevin Hoyt – kevinhoyt.org
Lee Brimelow – theflexblog.com
Mike Chambers – mikechambers.com
Mike Downey – madowney.com
Rich Tretola – everythingflex.com
Ryan Stewart – digitalbackcountry.com

Language-Specific Integration

Adobe AIR: Develop on Adobe AIR with HTML and Javascript – adobe.com
Adobe Integrated Runtime (AIR) Resources Roundup for Ruby on Rails Developers – rubyinside.com
AIR for Linux – macromedia.com
CommandProxy: .NET / AIR Integration Proof of Concept – mikechambers.com
Extending Adobe Flash Player and Adobe AIR with C and C++ via ActionScript 3 – onflex.org
JavaScript Language Reference for Adobe AIR – adobe.com

Popular Applications

Adobe Developer Connection Developer Desktop – adobe.com
Agile Agenda – adobe.com
AIR PressRich Blog Editor – airpress.org
AIR Talkr – airtalkr.com
AOL Top 100 Videos – adobe.com
Apprise RSS Reader – macromedia.com
CFDocs on AIR – brianflove.com
Chorducopia – adobe.com
Color Browser – adobe.com
DiggTop – adobe.com
eBay Desktop – ebay.com
Finetune Desktop – adobe.com
FotoBooth – adobe.com
Google Analytics Reporting Suite – adobe.com
GuitarScales V2 – adobe.com
Joom Edit – adobe.com
Klok – adobe.com
kuler desktop – adobe.com
MyDesktopNotes – adobe.com
MyStylez – adobe.com
NetBook – adobe.com
Ora Time and Expense – adobe.com
PasswordKeeper – adobe.com
Posty – spreadingfunkyness.com
Qoove Notes – apollohunter.com
RichFLV – adobe.com
SearchCoders Dashboard – adobe.com
Spazan – Twitter client – adobe.com
SQLite Admin for AIR 1.0 – coenraets.org
StockQ: A Stock Quotes application, built for Adobe AIR – adobe.com
StudioCloud PSG (Proofing, Sales, and Gallery Manager) – adobe.com
Tumbleweed – tumblr.com
Tweetr – adobe.com
twhirlTwitter client – twhirl.org
WebKut – adobe.com
World Weather – adobe.com
Xdrive – xdrive.com
Xe-MoviePlayer – adobe.com

Resources

The Flex Show Podcast – theflexshow.com
AdvancED AIR Applications (Advanced) Book – amazon.com
The On AIR Bus Tour – adobe.com
Adobe AIR Free Book Download – ajaxian.com
Tons of new Flex / AIR articles and videos online – mikechambers.com
Adobe AIR group on Facebook – facebook.com
ScaleNine – skins and themes – scalenine.com

Third Party Integration

AIR Cairngorm (AIR extensions for Cairngorm) – ericfeminella.com
Building a desktop application with Ext, AIR, Aptana and Red Bull – extjs.com
Code completion for Adobe AIR in Spket IDE – spket.com
Intro to using Adobe AIR with Aptana (Video) – bestechvideos.com

Tutorials

40 Adobe AIR code examples – kevinhoyt.org
Adobe AIR Tutorial for HTML / JavaScript Developers – petefreitag.com
Adobe AIR and Flex – Getting Started – paranoidferret.com
Adobe AIR Tutorials – adobeairtutorials.com
AIR Tutorials – senocular.com
Adobe AIR Videos – youtube.com
Ajaxian Featured Tutorial: Build your first Adobe AIR app – ajaxian.com
Christmas Is In The AIR – 24ways.org

Seven Yu @ 04/14/2008 (1:22 pm)

AIR 中 File 对象的几个系统文件夹及其属性

AIR 有一个 flash.filesystem 包, 其中包含 File, FileModeFileStream 三个对象. 分别用来访问文件系统, 定义文件模式 和 读写文件流.

其中 File 对象有几个静态属性可以用来访问系统文件夹, 分别是:

PLAIN TEXT >> CODE:
  1. applicationDirectory         // 当前 AIR 程序安装文件夹
  2. applicationStorageDirectory  // 当前 AIR 程序专属存储文件夹
  3. desktopDirectory             // 当前用户"桌面"文件夹
  4. documentsDirectory           // 当前用户"我的文档"文件夹

下面做以详细介绍 (来自 Adobe® Flex™ 3 Language Reference):

applicationDirectory
该文件夹包含程序的所有安装文件. 该对象的 url 属性使用 app URL 协议(而不是 file 协议). 因此, 如果你使用 resolvePath() 方法创建了相对于 applicationDirectory 文件夹的 File 对象, 他们的 url 属性也是 app 协议.
注: 你不能对使用 app 协议的文件夹或文件执行写操作, 也不能删除和创建文件或文件夹. 修改应用程序目录中的文件内容是个坏习惯. 如果你想保存应用程序特有的数据, 考虑使用程序存储文件夹 (File.applicationStorageDirectory).

applicationStorageDirectory
该文件夹是应用程序的私有存储文件夹. 每个 AIR 应用程序都有一个唯一的持续性的存储文件夹, 该文件夹将在第一次访问 applicationStorageDirectory 时被创建. 他可以很方便地用来保存程序特有的数据.
该文件夹一般位于, X:\Documents and Settings\UserName\Application Data\AppId\Local Store 文件夹中, 其中 X 代表系统安装盘盘符, UserName 代表当前登录用户名, AppId 为 AIR 程序唯一 id , 该 id 取决于应用程序描述文件(appName-app.xml)中对 id 的描述. 建议该描述仿照包的定义方法以免出现重名, 例如 org.phpz.AIR.AppIdDemo
当卸载 AIR 程序时, 这个文件夹中保存的文件不会被卸载程序删除.
该对象的 url 属性使用 app-storage URL 协议.

desktopDirectory
用户桌面文件夹.

documentsDirectory
用户文档文件夹.
Windows 操作系统中, 该文件夹就是 "我的文档", 位置类似 X:\Documents and Settings\userName\My Documents). 苹果系统中文件位置为 /Users/userName/Documents.

以上两个文件夹均使用 file URL 协议, 且也都有读写权限.

Seven Yu @ 04/06/2008 (10:31 pm)

[翻译] Adobe AIR 应用程序描述文件模板

Tags: , ::

ProjectName-app.xml

PLAIN TEXT >> XML:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <application xmlns="http://ns.adobe.com/air/application/1.0">
  3.  
  4. <!-- Adobe AIR 应用程序描述文件模板.
  5.     为标识, 安装 和 运行 AIR 程序制定参数.
  6.     查看完整文档参考 http://www.adobe.com/go/air_1.0_application_descriptor
  7.     xmlns - Adobe AIR 命名空间: http://ns.adobe.com/air/application/1.0
  8.             命名空间最后的部分定义了 AIR runtime 所需的版本号.
  9.    
  10.     minimumPatchLevel - 运行程序需要的最低 AIR runtime 版本号. (可选)
  11. -->
  12.  
  13.     <!-- 程序的唯一标识串. (必须的) -->
  14.     <id>org.phpz.online-node</id>
  15.  
  16.     <!-- 程序文件名. (必须的) -->
  17.     <filename>Online-Note</filename>
  18.  
  19.     <!-- 安装程序中显示的程序名称. (可选) -->
  20.     <!-- <name></name> -->
  21.  
  22.     <!-- 程序版本标识符 (例如 "v1", "2.5" 或 "Alpha 1"). (必须的) -->
  23.     <version>v1</version>
  24.  
  25.     <!-- 安装程序中显示的描述. (可选) -->
  26.     <!-- <description></description> -->
  27.  
  28.     <!-- 版权信息. (可选) -->
  29.     <!-- <copyright></copyright> -->
  30.  
  31.     <!-- 设置程序初始窗口信息. (必须的) -->
  32.     <initialWindow>
  33.         <!-- 程序的主 SWF 或 HTML 文件. (必须的) -->
  34.         <!-- 注: 在 Flex Builder 中, SWF 的引用是自动的. -->
  35.         <content>[This value will be overwritten by Flex Builder in the output app.xml]</content>
  36.        
  37.         <!-- 主窗口标题. (可选) -->
  38.         <!-- <title></title> -->
  39.  
  40.         <!-- 系统界面类型 ("standard" 或 "none"). (可选) 默认值: standard. -->
  41.         <!-- <systemChrome></systemChrome> -->
  42.  
  43.         <!-- 窗口是否透明. 仅当 systemChrome 为 none 时可用. (可选) 默认值: false. -->
  44.         <!-- <transparent></transparent> -->
  45.  
  46.         <!-- 初始化时, 窗口是否可见. (可选) 默认值: false. -->
  47.         <!-- <visible></visible> -->
  48.  
  49.         <!-- 窗口是否可最小化. (可选) 默认值: true. -->
  50.         <!-- <minimizable></minimizable> -->
  51.  
  52.         <!-- 窗口是否可最大化. (可选) 默认值: true. -->
  53.         <!-- <maximizable></maximizable> -->
  54.  
  55.         <!-- 窗口是否可改变大小. (可选) 默认值: true. -->
  56.         <!-- <resizable></resizable> -->
  57.  
  58.         <!-- 窗口初始宽度. (可选) -->
  59.         <!-- <width></width> -->
  60.  
  61.         <!-- 窗口初始高度. (可选) -->
  62.         <!-- <height></height> -->
  63.  
  64.         <!-- 窗口初始 x 坐标. (可选) -->
  65.         <!-- <x></x> -->
  66.  
  67.         <!-- 窗口初始 y 坐标. (可选) -->
  68.         <!-- <y></y> -->
  69.  
  70.         <!-- 窗口最小尺寸, 指定一组 宽/高 值, 如 "400 200". (可选) -->
  71.         <!-- <minSize></minSize> -->
  72.  
  73.         <!-- 窗口最大尺寸, 指定一组 宽/高 值, 如 "1600 1200". (可选) -->
  74.         <!-- <maxSize></maxSize> -->
  75.     </initialWindow>
  76.  
  77.     <!-- 程序默认安装路径. (可选) -->
  78.     <!-- <installFolder></installFolder> -->
  79.  
  80.     <!-- 应用于 Windows 系统中的开始菜单路径. (可选) -->
  81.     <!-- <programMenuFolder></programMenuFolder> -->
  82.  
  83.     <!-- 应用程序图标. 单个图标指定 AIR 包中的一个 PNG 文件. (可选) -->
  84.     <!-- <icon>
  85.         <image16x16></image16x16>
  86.         <image32x32></image32x32>
  87.         <image48x48></image48x48>
  88.         <image128x128></image128x128>
  89.     </icon> -->
  90.  
  91.     <!-- 用户手动更新 (true), 或由默认的 AIR 应用处理更新 (false).
  92.     (可选) 默认值: false. -->
  93.     <!-- <customUpdateUI></customUpdateUI> -->
  94.    
  95.     <!-- 是否允许用户通过点击浏览器中的链接来启动程序.
  96.     (可选) 默认值: false. -->
  97.     <!-- <allowBrowserInvocation></allowBrowserInvocation> -->
  98.  
  99.     <!-- 程序可注册的文件类型列表. (可选) -->
  100.     <!-- <fileTypes> -->
  101.  
  102.         <!-- 定义一个文件类型. (可选) -->
  103.         <!-- <fileType> -->
  104.  
  105.             <!-- 在系统中显示的文件类型名称. (必须的) -->
  106.             <!-- <name></name> -->
  107.  
  108.             <!-- 要注册的扩展名. (必须的) -->
  109.             <!-- <extension></extension> -->
  110.            
  111.             <!-- 文件类型描述. (可选) -->
  112.             <!-- <description></description> -->
  113.            
  114.             <!-- MIME 类型. (可选) -->
  115.             <!-- <contentType></contentType> -->
  116.            
  117.             <!-- 文件类型图标. (可选) -->
  118.             <!-- <icon>
  119.                 <image16x16></image16x16>
  120.                 <image32x32></image32x32>
  121.                 <image48x48></image48x48>
  122.                 <image128x128></image128x128>
  123.             </icon> -->
  124.            
  125.         <!-- </fileType> -->
  126.     <!-- </fileTypes> -->
  127.  
  128. <name>Main</name>
  129. </application>

Seven Yu @ 04/05/2008 (10:06 pm)

系统托盘图标的实现

PLAIN TEXT >> ACTIONSCRIPT:
  1. package
  2. {
  3.     /**
  4.      * Author: Seven Yu
  5.      * Email: dofyyu at gmail dot com
  6.      * URI: http://phpz.org/?p=29
  7.      * */
  8.     import flash.desktop.DockIcon;
  9.     import flash.desktop.NativeApplication;
  10.     import flash.desktop.SystemTrayIcon;
  11.     import flash.display.Loader;
  12.     import flash.display.NativeMenu;
  13.     import flash.display.NativeMenuItem;
  14.     import flash.display.Sprite;
  15.     import flash.events.Event;
  16.     import flash.net.URLRequest;
  17.  
  18.     public class Main extends Sprite
  19.     {
  20.         public function Main()
  21.         {
  22.             // 自动关闭设为 false , 避免关闭最后一个窗口后程序自动退出
  23.             NativeApplication.nativeApplication.autoExit = false;
  24.             // 定义托盘图标菜单
  25.             var iconMenu:NativeMenu = new NativeMenu();
  26.             // 定义子菜单
  27.             var newNoteCommand:NativeMenuItem = iconMenu.addItem(new NativeMenuItem("New Note"));
  28.             var optionCommand:NativeMenuItem = iconMenu.addItem(new NativeMenuItem("Setting..."));
  29.             iconMenu.addItem(new NativeMenuItem("-",true));
  30.             var exitCommand:NativeMenuItem = iconMenu.addItem(new NativeMenuItem("Exit"));
  31.             // 退出程序事件
  32.             exitCommand.addEventListener(Event.SELECT,
  33.                     function(event:Event):void
  34.                     {
  35.                         NativeApplication.nativeApplication.icon.bitmaps = [];
  36.                         NativeApplication.nativeApplication.exit();
  37.                     });
  38.             // 加载托盘图标文件
  39.             var iconLoader:Loader = new Loader();
  40.             iconLoader.load(new URLRequest("logo/logo.png"));
  41.             iconLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, iconComplete);
  42.            
  43.             // 添加托盘图标
  44.             var sysTray:SystemTrayIcon; // windows 操作系统
  45.             var dockIcon:DockIcon;      // mac 操作系统
  46.            
  47.             NativeApplication.supportsSystemTrayIcon
  48.                 ? sysTray = NativeApplication.nativeApplication.icon as SystemTrayIcon
  49.                 : dockIcon = NativeApplication.nativeApplication.icon as DockIcon;
  50.            
  51.             sysTray && (sysTray.tooltip = "Online Note") && (sysTray.menu = iconMenu);
  52.             dockIcon && (dockIcon.menu = iconMenu);
  53.             // 关闭主窗口
  54.             stage.nativeWindow.close();
  55.         }
  56.        
  57.         private function iconComplete(evt:Event):void
  58.         {
  59.             NativeApplication.nativeApplication.icon.bitmaps = [evt.target.content.bitmapData];
  60.         }
  61.     }
  62. }

Next Page »