Posts Tagged Flash
[Flash] Mobile Gaming 介紹
這個 presentation slides 介紹了cs5 的mobile gaming 的新feature. 看來adobe 都是押重注在mobile gaming 方面上。
可能之後的sales 都有很大的部份是為了支援mobile gaming 方面,一個flash cs5 就可以develop 到andriod, iphone, window mobile, ovi 的手機。
Source: http://www.biskero.org/?p=4643
[Flash] Loader set init Width / Height 的問題
問題很簡單,就是當自己要 load image, swf 的時候,不能set loader 的 width 和 height. (set 了之後就不會 render image).
Chowky 在自己試過有過這種問題。
var loader:Loader = loader.load(new URLRequest("images/testimg.jpg");
loader.addEventListener(Event.COMPLETE,completeHandler());
private function completeHandler():void
{
//set 了之後就render 不到image.
loader.width = 100;
loader.height = 100;
}
之後chowky 就找了很久,都不太明白問題的原因。
坊間有太多不同的解決方法,不過看完就明白到問題原因。
簡單來說,因為 loader 未load完 (chowky 估計是Event.COMPLETE 的時間都未load 完成)
[更新一下,雖然loader 已經load 完,不過content 未完成 (這個logic 雖然不太通),就是image 未ready。所以我們應該listen _loader.contentLoaderInfo 而不是_loader 本身]
chowky 見過會利用scale 的方法去做。(算吧了)
var _loader:Loader=new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadCompleteHandler);
_loader.load(new URLRequest("images/myphoto.jpg"));
this.addChild(_loader);
function loadCompleteHandler(evt:Event) {
evt.target.content.height=100;
evt.target.content.width=100;
trace("Finish resize");
}
不過 chowky 的解決方法是自己寫一個class extends sprite ,再update sprite 的size. chowky 覺得這種做法比較適合,custom loader class (oh….又花了一整天)….
真辛苦呢。
Apple ipad iphone 不加入 flash 真正原因?
iPhone 和 iPad 都是利用了html 5 + css 來播放rich media (e.g. youtube),看來 flash 在ipad 和iphone ,都不會在iphone 上出現。 (flash cs5 所做的 native 方法就另計)
flash 對於rich media 上來說是十分重要的,因為大量的 rich media,都是利用了 flash 的 technology (flv)。況且 html 5 + css 在近幾年都應該不會流行。
Apple 表示,不加入 flash 的原因是因為 “flash is too buggy and will crash the whole device”. 但明眼人都知道這個只是藉口。

比 Flash Media Server ( FMS ) 更強大的 Media Server !?
Wowza Media Server 2
當然是 commercial licensed server。
為什麼會話比FMS 更強大呢~,
除了支援 flash platform 之外。
還支援了:
- Apple iPhone and iPod touch
- Microsoft Silverlight
- Apple QuickTime
- Set-top boxes and more…
看來都不錯,什麼client 都支援到,一個server 就做到所有的東西,而且又沒什麼大的限制,當然都不是平的呢。
不過計上去應該會平過FMS的呢
[Flash] Fullscreen Mode
Posted by Chowky in Flash, RIA, Uncategorized on January 7, 2010
自從flash player 9.0.28 之後,flash 就支援fullscreen~,就已經不用以前的額外javascript。
只要在flash IDE 的publish 加上allowfullscreen,IDE 就會自動加上這個attribute
當然你亦可以在swfobject 自己加上
<param name="allowFullScreen" value="true" />1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | //Don't scale the movie when the stage size changes Stage.scaleMode="noScale"; //Align the stage to the top left Stage.align = "TL"; //Function to toggle between fullscreen and normal size //the toggle fullscreen button calls this function when pressed function toggleFullScreen(){ //if normal size, go to fullscreen, else go to normal size if(Stage["displayState"]=="normal"){ Stage["displayState"]="fullScreen"; }else{ Stage["displayState"]="normal"; } } //Create a listener for each time the Stage is resized var resizeListener:Object = new Object(); //Called each time the stage is resized resizeListener.onResize = function () { //Move the button to the center of the screen toggleFullScreenButton._x=Stage.width/2; toggleFullScreenButton._y=Stage.height/2; } //Add the listener to Stage Stage.addListener(resizeListener); |
Source: http://www.bezzmedia.com/swfspot/tutorials/flash8/True_Fullscreen_Flash_Mode
[Flex] HTML WYSIWYG Editor
相信如果大家有做開flash 的都知道,flash 在html 的support 真的很有限。簡單來講flex 的RichTextEditor 是useless. Chowky 都有試下自己開發一下,不過就問題太多,不值得投放太多時間。
見到別人這個html editor ,以為有人真的會重寫整個richtexteditor component不過原來是embed 了html javascript 的editor.
這樣做的話,始終不是chowky 想要的解決方法。
原本以為 Text Layout Framework 可以幫到手,不過他會有自己的一套syntax (chowky 倒覺得是正常的),當然情況就不太好的呢~。chowky 一直覺得flash 不應該做排版的工作,所以利用flash 來做CMS 真的有點怪。
不過這個editor 應該夠用了。希望free 的text layout editor 會推出~~ 問題就會解決了,哈~
Source: http://www.dgrigg.com/post.cfm/12/23/2009/Flex-WYSIWYG-Html-Editor
[Flash] Improving Timeline Using Tweening Engine
現在的flash/flex developer 都已經減少採用了flash 所提供的timeline 來造 animation (chowky 是指 interface /transition 的animation),取而代之就是兩隻不同的tweening engine.
1. TweenLite/ TweenMax ﹣ http://blog.greensock.com/
2. Caurina Tweener ﹣ http://code.google.com/p/tweener/
基本上兩種都是免費的。
Caurina 會稍稍再好一點,因為是採用了MIT license
建議大家兩種都要學習,兩隻的用法其實是差不多的,因為很多不同的sample / tutorial 都會各自採用,所以當別人使用了的話,至少要看得明白呢。 (應用上,chowky 會 suggest caurine tweener, 始終mit 是沒有任何license limitation,而且太相似了,有完全免費的就當然要用啦~)
文中所介紹的方法,是利用tweenlite 來控制timeline.
當然同樣地可以改用tweener.
在flex 的角度,差不多必定要用tweening engine 而放棄 flex 的 animation library….原因很簡單,有bugs…..這個情況發生在ILOG Calendar 上 (當在複雜的情況之下)。chowky 自己亦在中招之後就利用tweening engine 來控制 animation 的 start/stop.
Source: http://blog.alanklement.com/2009/11/27/improving-flash-interactive-timeline-animations/
Flash&Flex Magazine Nov-09 Issue
大家有機會可以去看看~~
不過有很多廣告呢~~,但對developer 來說,看看這種magazine 可以令自己更update ~而且可以有多一點國際視野…
在香港跟本就不會有這種雜誌呢….香港只有low end, hardware 的東西,跟本不太著重於software 的配合….
developer 太專了,跟本沒有雜誌去target 這類user.
[Flash] game <3K 都可以做到?
chowky 覺得game 最重要的不是game art,畫面,最重要的是GAME的遊戲性呢。
哈,當然,這三隻game 其實都不錯呢,不過簡單了一點,遊戲性就大打折扣了..~
可惜人就是膚淺的呢,artwork 好看就當然易點吸引人買
Source: http://www.blackcj.com/blog/2009/10/11/build-a-flash-game-in-under-kb/
[Flash] CS 5 最大的feature

當然是iphone 的支援。現在iphone 能支援的是Actionscript 3. 幸好不是flashlite …
這樣做法是否會改寫iphone 的development lifecycle?
當然adobe這樣做,當然會影響了apple 的closed ecosystem 的方針,不過apple 看來都很難去找理由去ban的呢。(trend來呢~)
因為現在的做法是要利用flash cs5 才做到,再利用apple的certificate。(好明顯就是adobe 和apple 磋商了很久)
這樣做法都算是native 的呢。對於app store 的應該無影響。
這樣做,出現破解的情況會愈來愈惡化。
不過,其實都已經破解了haha~~都不打緊了
AIR 都可以………well not bad….full flash 10, with AIR……
Which version of the Flash Player is supported when targeting the iPhone?
The Flash Player API set available when creating content for the iPhone is based on the core Flash Runtime used in Flash Player 10 and Adobe AIR 2.0.
Which Flash Runtime APIs are available when developing for the iPhone?
As a general rule, Flash Player 10 and Adobe AIR 2.0 APIs are available when developing content for the iPhone. However, there are a number of exceptions, including, but not limited to:
* Embedded HTML content (via webkit in Adobe AIR).
* RTMPE
* Dynamically loading SWFs that contain ActionScript
* PixelBender Filters
* Microphone Access
* Video Camera Access
…..iPhone 始終都是native 的object-c 先用到Mic 和Video Camera. 而且不能自己build 一個air 的web browser (到時什麼的flash 都run到)
Source: http://labs.adobe.com/technologies/flashcs5/appsfor_iphone/






Recent Comments