September, 2006 > 所有文章列表

flash goes VoIP !

In flex   September 23, 2006 - 11:51 am

一大早起來信箱就被灌爆了,到處都是關於 Flash Player 將支援 VoIP的新聞,而巧合的是,我目前進行中的一個 flex project 就是要整合 flex 與 VoIP/SIP/XMPP等協定,因此其中一封就是來自美國客戶的熱切詢問,害我牙也沒刷就先把這一串報導看完,下面是精華整理。

*簡介

事情的起緣是 GigaOM 上面的一篇報導,搶先被露了 Adobe 最近剛成立了一個 VoIP project team, 並且網羅了號稱 “God Father of SIP” 的 Dr. Henry Sinnreich加入這個團隊,將要為 Flash Player 加入 VoIP層,也就是說在既有的 NellyMoser audio codec 之外,終於會有支援一般 H.323等常見 audio format 的 codec 在 flash player裏。


(Henry, SIP God Father - 桌上那是什麼怪電話啊~~)

並且由於請來的是 god father, 因此 SIP 支援當然也少不了,而瞭解 VoIP的人通常都會知道 SIP在 VoIP裏扮演的角色與功能有多重要,所以一旦 Flash Player 支援 VoIP/SIP,那將來 SIP stack, presence information 與 P2P Autodiscovery等全部內建,可以玩的東西就多到數不清了啊,詳細的應用實例可在下列四篇文章中看到,個人認為那些只是皮毛中的皮毛,還不到這整件事價值的百分之一。

現在大家唯一比較好奇的就是實作方式,大部份都猜測應該會循 Breeze 模式(喔,對了,這玩意已經被併入 Acrobat 產品線,現在叫 Adobe Acrobat Connect),仍然採 client-server 架構,也就是說 Adobe 仍然靠賣server賺錢(com’on,一年可以賣幾套?到底何時才要覺醒?)。

但有趣的是在第四篇的專訪中,這個project 的 team leader 似乎有比較開明的想法:

You know, frankly I don’t know what value a server will brings long-term in IP communications.

If technically you don’t need a server, why would you push a server down the throat of your customers?

所以,如果這位 PM 肩膀夠硬,然後他的客戶態度夠強悍,或許將來的 VoIP版 Player 就會不需要 server,而用類似 Skype 之類 P2P autodiscovery 的方式來達成 SIP,如果真是這樣,那歡樂的時光就指日可待囉。

*四篇相關報導

GigaOM

Alec

VoIP Watch

VoIP & Gadgets blog

*後記

寫到這裏突然想到一件很有趣的事。

-在1990年初:那時 photoshop 2.0,任何人只要會用 photoshop/illustrator 就可以稱的上 digital artist。

-然後 1996年 flash出來了,這時你得多會一樣動畫軟體,要開始瞭解 timeline,frame per second, 甚至是簡單的聲音剪輯、處理,因為做動畫總少不了成音啊~

-然後 2000 年初期 RIA出現了,這一年 FCS 也面市,此時的 digital artist 得寫的一手好 Actionscript,睡覺時夢境都是以 movie clip 方式呈現,並且,還要瞭解 vidoe (MPEG壓縮原理、stream運作與 client/server架構)才能寫出線上video應用與多人連線遊戲。

-接者 2004年來了,這一年 Flex 問市,RIA 與 AJAX成為顯學,每個人都在問 Flash vs Ajax 到底熟優熟劣(到最後我聽過最棒的答案是:字母比較長的那個比較好,畢竟字母多一定比較厲害,對吧?),而 java/.net 工程師也進來寫 actionscript, 大家開始 K OO, Design Patterns,越來越多以前所謂的 Flash Designer 書架上多了一本 Head First Design Patterns。

-然後就是2006年,這一年所有手腳夠快的玩家都開始用 Eclipse,談的是 mxml 與新的 AVM,以及猜想者何時 apollo 會出來然後可以正市進軍桌面市場,而就在此時,VoIP來了。

-所以,2008年時會是什麼光景呢?老實說還沒發生,所以不知道,但根據鑑往知來的原則,到了那時,Flash Developer 將會要一手包辦 mxml/actionscript/auido/video/SIP/P2P/Client-Server/Mobile 等一切事情,任何一個 day-to-day project 都將有可能同時需要整合這一切元素,到時的日子可以想見是多彩多姿好不活潑吶~

所以結論到底是什麼?嗯,這兩天該買進 Adobe 了…(b6s長輩請問你到底找好組合沒?我還在殷切期盼您的報馬呢…)

comments(2) | by admin

Using repeated tile image as flex background - a solution

In flex   September 21, 2006 - 8:46 am

A reader brought this question to me the other day, saying: "Could we use a 1px image as the background, and let it repeat to fill the whole area ?"

This making thinking is it really possible ?

Normally, if we use something like

XML:
  1. <mx :Controlbar background="a.gif" />

The result would be like this:

 

the tile we used (the tiny green image) will be centered in the control bar

and if we use the following syntax:

XML:
  1. <mx :Controlbar background="a.gif" backgroundSize="100%" />

the result would be even worse, the tile will be stretched to fill the background, like this

After digging into this issue for an hour or two, finally I found a possible way to let the tile image repeat just like those in the html world.

As seen in the image above, the same green tile image is repeated to fill the control bar, so does the yellow tile image in the applicaiton background.

Here's another one showing when the panel is resized, the tile will be automatically resized to fill the background again (in real-time)

When I first tap into this problem, I thought I might have to override a lot of thing (like box, container which are controlbar's parent class) and do the repeat logic by code.

But after a while I found all those background are programmatically drawn in real-time, so end up I just had to set a new skin to the panel and modify one place or two (plus using beginBitmapFill() with the bg image) to make the tile repeat.

What I learned in doing this is that flex 2 framework is really a very well thought-out structure, making it easy to add user features and simply hack the code to achieve great stuff.

Now I'm working on a better version to honor repeat-x, repeat-y argument, so it would be more like what people used to do in html world, after I get this done and made sure it works with every kind of background (as in Panel, ApplicationControllBar, Application background...etc), it will be released.

source (updated Dec. 5, 2006)

comments(20) | by admin

有趣的 flex framework comment

In flex   September 20, 2006 - 1:05 pm

今天在追蹤一段 framework 的程式碼時,意外看到在某個class內有下列註解:

"Although at the level of a Flash DisplayObjectContainer, all
children are equal, in a Flex Container some children are "more
equal than others". (George Orwell, "Animal Farm")"


(George Orwell 所寫的 Animal Farm)

呵,原來寫註解也是要有文膽的啊~

comments(2) | by admin

flex2 component - Tree with checkbox

In flex   September 16, 2006 - 10:00 am

Just made this for the project I'm currently working on, main features include:

-when branch selected, all child node will be selected

-when branch is de-selected, all child node will be de-selected too

-when some of the children were selected but some are not, branch(parent) node will be greyed out.

-when the Tree first initialized, branch will restore to correct status (to grey out, select, or not)

Thanks to the new framework, it's quite easy to made this kind of stuff.

comments(5) | by admin

Max 2006 Taiwan !

In General, flex   September 15, 2006 - 11:25 am

官方網頁

Yeah baby, it's that time agin !

令人懷念的 Max Taiwan 又來了,基本資料如下:

2006 年 11 月 2 日 - 3 日
TICC 台北國際會議中心
台北市信義路五段1號

費用:3600 - 6000 之間(越早報名越便宜)

另外有個團體報名優惠,四人就算團體,所以,想湊團的朋友來個信吧,還差兩個 ^^

Add comment | by admin

Previous Posts

mobile phone