2009年12月31日 星期四

2010 新年快樂 wonderfl FORK 合戰 10万円獎金

wonderfl 在 2010年 1月1日至1月26日舉辦 FORK數 比賽

主辦單位會出一個課題, 之後像平時一樣給人提交作品
 完成一個成功的FORK越多越有機會得獎
即是做得多勞多得

詳細情況
http://wonderfl.net/code/a03ef24a8aec6742aa9b9e3d81546fec2a8bcc4b

課題將會在此發表
http://nengafl.wonderfl.net/index_en.html

2009年12月26日 星期六

檔案轉換 Convert rmvb to flv

原本以為 ffmpeg 不支援 RMVB / WMV9 格式
所以找了 memcoder (similar to ffmpeg)
 
1.) 首先將 rmvb 檔 轉到去 avi 檔
memcoder command:
mencoder demo.rmvb -oac mp3lame -lameopts preset=64 -ovc xvid -xvidencopts bitrate=600 -of avi -o demo.avi

2.) 之後再由 avi 轉到去 flv
ffmpeg command:
ffmpeg -i demo.avi -ab 56 -ar 22050 -b 500 -r 15 -s 640x480 demo.flv

不過我再試一下用 ffmpeg 直接轉換如下:
ffmpeg -y -i demo.rmvb -ab 32k -ar 22050 -b 300k -bt 100k -r 15 -s 640x480 demo.flv

一樣也可以轉換成功呀 !!!
但就出了一堆 warning message (可以不理會)
[aac @ 0x3eb8a0]SBR not implemented. Update your FFmpeg version to the newest one from SVN. If the problem still occurs, it means that your file has a feature which has not been implemented.



ffmpeg download:
http://www.videohelp.com/tools/ffmpeg

memcoder download: (command  line tool)
http://www.videohelp.com/tools/MPlayer

2009年12月25日 星期五

Multi Touch in Adobe AIR2 and Flash Player 10.1

Adobe 不久之後將可以支援 Multi Touch, 雖然是 beta version, 已經可以測試一下 (只要有 Multi Touch Device & Window 7)

MAX 2009 Develop Show Case:
http://tv.adobe.com/watch/max-2009-develop/multitouch-demos-in-adobe-air-2-and-flash-player-101/

Gesutre Samples:
http://www.adobe.com/devnet/flash/articles/multitouch_gestures.html

 TouchEvent help Docs:
http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/events/TouchEvent.html

寫法十分簡易, 如果你已經熟悉AS3, 應該不是甚麼困難的東西
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

MySprite.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
MySprite.addEventListener(TouchEvent.TOUCH_MOVE, onTouchMove);
MySprite.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);

function onTouchBegin(eBegin:TouchEvent) {
     eBegin.target.startTouchDrag(eBegin.touchPointID, false, bg.getRect(this));
     trace("touch begin");
 
 }

function onTouchMove(eMove:TouchEvent) {
    trace(eMove.stageX);
}
 
function onTouchEnd(eEnd:TouchEvent) {
     eEnd.target.stopTouchDrag(eEnd.touchPointID);
     trace("touch end");
}

2009年12月20日 星期日

MinimalComps: Minimal AS3 UI Component Set

MinimalComps 是一個小型,輕便的介面元件
完全係純AS3 code, 不像 Flash IDE 的元件那麼消耗資源
好處是不用重新寫一個  Button, Slider 之類麻煩元件
用來做一個簡單的範例作測試是最好不過

轉載範例:
CheckBox, PushButton, HSlider, VSlider, InputText, ProgressBar, RadioButton, ColorChooser (text input only) and Panel.


Meet the Meter, Rotary Selector, and Indicator Light

Google Code Source:
http://code.google.com/p/minimalcomps/

You can download the source here:
http://www.bit-101.com/minimalcomps/

轉載自:
http://www.bit-101.com/blog/?p=1126
http://www.bit-101.com/blog/?p=1217 

2009年12月17日 星期四

Adobe CS5 將不發放 Beta version 給人們試用

在2009年10 Adobe 發放有關 Flash CS5 可開發 iPhone Application 的消息
並在2009年12月尾會有 Beta Version 給人試用.
大家都非常興奮~因為可以不用那 麻煩的Objective -C 去寫 iPhone Apps.

可惜....Adobe 現在公報...暫不開放beta version 呀 ~~~~~~~~
不過, 都未嘗是一個不好的事, 因為唔出beta 的原因~係為了更快完成 completed version.
希望今次 Adobe 不要再 cheat 我們吧 !!!

消息來源:
http://blogs.adobe.com/flashplatform/2009/12/there_will_not_be_a_beta_for_f.html

2009年12月16日 星期三

在Flash上使用 Text to Speech

1.) 使用 Google Text to Speech 實例 (只限英文):


外部連接 URL
var url:String = "http://translate.google.com/translate_tts?tl=en&q=";

參考自: http://wonderfl.net/code/889012d47932563048d9273c899485cf1961e468

2.) 日文語音發聲引擎實例:


 外部連接 URL
var url:String = "http://api.satoru.net/text2voice/?text=";

參考自: http://wonderfl.net/code/4fd4e48c6017d08c887bb0ad8804db2cb9f59ebb

2009年12月15日 星期二

日本人 Flash 社群

 Spark Project (一個非常龐大的社群, 包含了很多 open source as3 code, 極之有用)
http://www.libspark.org/

wonderfl - build flash online (可以在線上即時建立 Flash 檔, 分享或修改他人的創作)
http://wonderfl.net/

beautifl - flash gallery of wonderfl (主要收集並且分類, 找尋Flash特效非常有用)
http://beautifl.net/

ClockMaker (高手們的集中營...!!!)
http://clockmaker.jp/labs/

2009年12月14日 星期一

初音ミクの時計

夜晚睡覺前, 打算尋找一些動畫歌曲

非常偶然地發現了一個好可愛的 ミク時計 Flash檔



swfURL: [http://www5b.biglobe.ne.jp/~s-sakaki/mikuclock.swf]
使用方法:
<embed height="180" src="swfURL" width="150"></embed>

現在可以隨時放入自己的 Blog 做一下報時

2009年12月13日 星期日

一個webcam 多個program 共用

最近做一個Research Project 關於 Motion Tracking.
用到 OpenCV 做計算部份, 介面就是用到 Flash.
問題來了, 當同時用到同一個 webcam 時, 開啟不能 !!!!! OMG
因為 Driver 不支援
所以在網上找了一個Software 可以令多個 Program 都可以使用一個webcam

http://www.manycam.com/
這個非常好用
還有預計的 火炎效果, Face Detection, Motion Detection.....etc

2009年12月12日 星期六

[AWAY3D] Particle System

Away3D 在眾多 Flash 3D engine 當中,  表現上都比較快速及穩定
不過就是欠缺了重要的 Particle System.
為了填補這空缺, Away3D 推薦了一個  3rd Party 的 Particle System engine
FLiNT particle system 這是一個 AS3 寫成的 engine, 所以可以相容其他 2D and 3D engine.

以下是 FLiNT 的 Source cdoe
http://code.google.com/p/flint-particle-system/

2009年12月11日 星期五

[JSFL] Update MovieClip's name in Library

1. Select items in the stage
2. Run the script

Here is the script:

if (fl.getDocumentDOM().selection.length > 0)
{
var cur_selection = fl.getDocumentDOM().selection;
var mySelected = new Array();

for(var i in cur_selection)
{
mySelected.push(fl.getDocumentDOM().selection[i]);
}

for(var i in mySelected)
{
var sel = mySelected[i];
var path = sel.libraryItem.name;
var pName = sel.name;
var mc_name = path.substr(path.lastIndexOf("/")+1);
if (mc_name != null)
{
fl.trace(path + "_" + pName);
fl.getDocumentDOM().selectNone();
fl.getDocumentDOM().selection = [sel];

var newMc = fl.getDocumentDOM().convertToSymbol("movie clip", path + "_" + pName, "top left");
fl.getDocumentDOM().selection[0].name = pName;

fl.getDocumentDOM().selection = mySelected;
}
}
}

[Cast3D]3D Animation

3D Boxman (四葉妹妹紙箱人) Demo by using PV3D and Cast3D
The 3D Boxman is created in 3DMax and converted to xc3 by Cast3D

Remark: Cast3D is an 3D animation framework for flash. It supports 3dmax and maya aniamtion.

[AWAY3D]Matching Card in 3D

4 faces Matching Cards Game
It is a quick demo by using plane & line in 3D flash
The 3D engine is using Away3D and ASWING GUI Button.

[PV3D]My Valentine 2009

This is an eCard of 3D heart for my valentine by using PV3D engine.
The 3D heart is modelling in Maya.(one hour)