Category Archives: 工作

記錄工作時候,有關的東西

Flex retrieve SWF compile timestamp

http://www.igorcosta.org/?p=220&cpage=1#comment-115402 – use FlexGlobals.topLevelApplication.systemManager.stage.loaderInfo to get application loaderInfo – to access SWFLoader info, use swfloader.content.loaderInfo. – swfloader.loaderInfo is null for non-root application

[轉載]PHP Common Class

source: http://calos-tw.blogspot.com/2010/11/10-php.html Source I’ve compiled a small list of some useful code snippets which might help you when writing your PHP scripts… Email address check Checks for a valid email address using the php-email-address-validation class. Source and docs: http://code.google.com/p/php-email-address-validation/   include(‘EmailAddressValidator.php’); $validator = new EmailAddressValidator; if ($validator->check_email_address(‘test@example.org’)) { // Email address is technically valid } else { //… Read More »

Flex Builder / Flash Builder Debug 手冊

Flash builder 4 作為一個IDE,不可不提及Debugger。 要知道一個良好的debugger可以大大加快開發過程, 令開發始更了解 程序本身在幹甚麼。 特別是flex作為前台的建構元件加上他的event-driven機制,大部份功能都是透過event來處理用戶互動(user interaction)。 [簡單來說就像firebug與html/css/js開發的關係,沒firebug會很難過….] Flash builder的debugger與eclipse的debugger大同小異(借用嘛…) 下面的文章(英文)詳細介紹及指導了debugger的功能: http://www.adobe.com/devnet/flex/articles/flashbuilder4_debugging_part1.html http://www.adobe.com/devnet/flex/articles/flashbuilder4_debugging_part2.html http://www.adobe.com/devnet/flex/articles/flashbuilder4_debugging_part3.html 主要功能: – Breakpoint (Step in / over /out) – Conditional Breakpoint – Watchpoint – Variable list – Watch Variable – Remote debug

Red 5 學習資料

Flex的特色是RIA(Rich Internet Application),故名思意就是建立在Internet的基礎上,亦即是client/server 的原理。(當然你亦可以用flex建立desktop application,不過要配搭AIR使用。現在android也support AIR了) 在client方面,我們選了flex,那麼在server那邊呢? adobe當然希望我們用它提供的server,Flash Media Server(fms)作為server的選擇。雖然和flex配合得最好,但是它的license fee實在令人卻步。 那還有甚麼選擇/replacement? 如果你是php developer,那麼amfphp是你的不二之選。 http://amfphp.sourceforge.net/ 如果你是java developer(JavaEE),那麼就選Red5。 http://osflash.org/red5 [p.s. 根據document,Red5 好像 還支持其他language e.g. php/python/actionscript3] 應該還有其他好的server選擇,如blaze ds,不過小弟對flex還是入門級別,所以我也不清楚了XD。有興趣可以找找adobe flex的官網,好像有提及過。 因工作的關係,現在的使用的是Red5 server,所以我只記下red5的資料(邊學邊記) Red5 server有兩種形式,亦可以說成結構: 一種是standalone 另一種,當成是tomcat的plugin/library standalone 版red5自身就是一個tomcat server,可以執行java servlet等。 因小弟對java只限於SE級別,為免說錯EE 的東西,所以就不多說了。 而library版red5,是配置成一個war,經api使用在tomcat/jBoss等Java server上運行。(大慨) 詳細資料及結構上就要看red5 official document了(不過我看完也一頭冒水= =b)。 這邊暫時也只談standalone版(正在用嘛..) red5 standalone版自身除了tomcat外, 還結合/使用了 一大堆.jar library,所要要有心理準備會很混亂。 已知的plugin Spring framework (JavaEE… Read More »

android PNG hidden secret

不說不知道, 原來android自身會對apps上的PNG圖片進行自動轉換~ 如果你發現你apps上的png怪怪的(特別是用到alpha的png,e.g. 半透明),就要看一看這篇了。 ref. article: http://android.nakatome.net/2010/04/bitmap-basics.html