Posts Tagged FLEX

[Flex] Flex Builder 4.5 改colour theme

chowky 一向習慣用 low contrast 的dark theme.

因為太長時間望著電腦,white background 會覺得刺眼 (有要求呢)

而dark theme 之中,十分出名的是zenburn,而chowky 都試過十分多的dark theme,最舒服的都要是zenburn 了,

visual studio 系列,eclipse 系列,notepad++ 全部都有

這次要flex builder 4.5..
當然,由下面的link download zenburn theme (Eclipse Preference EPF)

1.打開Flex Builder 4.5
2.File -> Import
3. General -> Preference
4. Next
5. Select the downloaded zenburn theme
6. Finish.
7. Close and reopen Flex Builder 4.5

http://www.eclipsecolorthemes.org/?view=theme&id=915

Share

, , , ,

No Comments

[Flex] FluorineFX .NET with Flex

大家在使用FLEX 的時候,大多數都會PHP + FLEX。

不過ENTERPRISE 如果已經有 window server ,就很自然會採用.net 這個做法。

如果不能夠打破flex + .net 這個方法的話,其實是比較困難去推動flex 這種技術。

chowky 找到兩種方法Weborb or fluorineFX.

雖然WebOrb 和fluorinefx 基本上都是free 的。
不過fluorinefx 就是opensource 而,weborb.net 就是close source…..所以chowky 就採用fluorinefx 試試先~

奇怪在,local 試就ok…十分簡單,不過deploy 去window server 2003 iis 6 就真的很困擾….

下次介紹chowky 的解決方法呢~

Share

, , ,

No Comments

[Flex] Enterprise 利用 Flex 的 Do’s and Dont’s

雖然香港還未多人用flex ,不過later 應該會多一點人用呢~

chowky 除了覺得SEO 在flex 上面仍然是一個問題之外 (所以以chowky 的專業意見來說是會suggest html + flash),RIA 上面應該會要100﹪ 肯定會用flash。加上可以利用CS5 的 flash catalyst,改變傳統的創作模式,相信會愈來愈多人採用。

ok~ 題外話已經講完。

Flex 上做data visualization,其實是很合適的。

Enterprise 在技術上的應用是會比較慢的,(完全合理,因為IT system 是公司營運的重要一環,不會輕率地採用。)
現在 SAP,Crystal Report 都慢慢加入這個新功能,所以大家都會慢慢地見到AIR/FLEX 開發的的產品。雖然flex layout framework 加入了flash platform 入面,但是flash 的文字處理功能都仍然是弱,所以有可能只是某一些地方採用了flex ,而其他的都會用回html, java ..etc。
不過連oracle 都講和sell enterprise 2.0,看來enterprise 用RIA 應該只是時間問題。

這篇文章的作者真的不行

1. 利用MVC:正常的enterprise 的大project 都會有採用design pattern ,而flex 就應該利用 MVC model 的。

2. 放棄用 XML: enterprise 的project 必定是用database…..MSSQL/ORACEL DATABASE…..

3. Use resource bundles: for multi-language use. 同意的,現在每一個system 都想做到multilang。

4. Stay away from the Flex Builder WYSIWYG Editor: chowky 覺得他解釋得不對,雖然chowky 少用flex builder 的 wysiwyg,只是因為太慢,但不是不等如不用,hardcode X,Y ,很明顯只是作者不太了解flash builder wysiwyg…,我們可以改用left, right, top, bottom 的attributes ,這就可以解決hardcode x,y 的問題。

5. Don’t mix AS with MXML: 作者很明顯是java 的developer,functionality (chowky 是指business process) 竟然會放在flex 上run….正常會放在backend server,server process the result 再 return flex 4,原因是 enterprise 的data 的量和business logic都會是比較complex 的,server會比client PC 快很多,而且flex 4 是layout 都大概都會是利用skin 的方法。分不分AS / MXML 真是不太重要。

Source: http://flexonjava.blogspot.com/2010/04/enterprise-flex-development-dos-and.html

Share

,

No Comments

[Flex] Flex 4 DataGroup

Flex 3 大家都有用的一個component 都應該是repeater.

但到了flex 4 之後,就改為datagroup。

不過其實用法就無改變呢~

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
28
29
30
31
32
 
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" width="500" height="200" initialize="init()" viewSourceURL="srcview/index.html">
 
    <fx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
 
            [Bindable] public var productData:ArrayCollection;
 
            private function init():void {
 
                productData = new ArrayCollection();
                productData.addItem({"name":"Chocolate","price":"3"});
                productData.addItem({"name":"Beer","price":"5"});
                productData.addItem({"name":"Candy","price":"2"});              
            }
 
        ]]>
    </fx:Script>
 
    <fx:Declarations>
        <
    </fx:Declarations>
 
    <s:DataGroup itemRenderer="ProductsRenderer" dataProvider="{productData}" rollOverColor="0xFFCC00">
        <s:layout>
            <s:VerticalLayout horizontalAlign="center"/>
        </s:layout>     
    </s:DataGroup>
</s:Application>
1
2
3
4
5
6
7
8
9
10
11
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
                xmlns:s="library://ns.adobe.com/flex/spark" 
                xmlns:mx="library://ns.adobe.com/flex/mx" 
                autoDrawBackground="true">
    <s:layout>
        <s:HorizontalLayout verticalAlign="middle" />       
    </s:layout>
    <s:Label text="{data.name}:" width="100" fontWeight="bold" />
    <s:TextInput text="${data.price}" width="50" />
 
</s:ItemRenderer>

Source: http://www.flex-blog.com/flex-4-flash-builder-4-repeater-changed-to-datagroup/

Share

, ,

No Comments

[Flex] Flex Pixel Bender

Flex 4 是可以利用pixel bender 來做新的effect 了。

這位作者就做了這個effect 來demo 一下pixel bender 的能力。

比起flash 本身有的filter (blur filter, glow filter, shadow filter…),這個當然會有很多新的玩法…. 記下來,可能遲一點會幫到你。

Source: http://www.artima.com/articles/bend_your_pixels.html

Share

, , ,

No Comments

[Flash] Conduit for Flash Pixel Bender

flash 雖然本身都有很多的方法去做到不同效,不過點都不夠用pixel base 來做的效果。

不當然,這個software 都要錢呢~

Are you hitting the limits of visual effects or ActionScript performance in Flash?

The latest Flash Player version 10 introduces a powerful new feature: Pixel Bender shaders. Using shaders you can bypass Flash’s built-in image effects and blending modes and instead manipulate pixels at will. Shaders are rendered in realtime, so they can be applied to video as well as images.

Shaders are not just for graphics either — they can also be used to perform any other intensive computation in Flash. Shader computation automatically takes advantage of modern multicore processors. Shaders in Flash are a high-powered computing engine that allows a web app to jump directly into the multicore era, leapfrogging even traditional desktop apps in performance.


Source: http://lacquer.fi/conduit/pixelbender/

Share

,

No Comments

[Flex] Away 3D 用法的簡介

雖然chowky 支持papervision 的MIT license多一點,只不多apache license 的away 3D 的performance 真的 very impressive. 已經有愈來愈多的gaming 都採用away 3d 來做。

怎開一個flex project 和加入away 3d 的library 就不提了,自己找找吧。

Away 3D 要用actionscript 來加入的,away 3d 的是利用了View3D作為他的container class.

override protected function createChildren():void
{
    super.createChildren();
    view = new View3D();
    addChild( view );
    view.addEventListener(Event.ADDED_TO_STAGE, update);
}

RectangleClipping 就好似一個mask ,大過mask的部份就會不顯示。

private function update(e:* = null):void
{
    view.x = unscaledWidth/2;
    view.y = unscaledHeight/2;
    view.clipping = new RectangleClipping({minX:-unscaledWidth/2,minY:-unscaledHeight/2,maxX:unscaledWidth/2,maxY:unscaledHeight/2});
    view.render();
}

最後當然是要加入updateDisplayList,因為每一次 flex refresh screen 的時候就會call 這個method.

override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
    super.updateDisplayList(unscaledWidth, unscaledHeight);
    update();
}

Sample Application
View Source

Source: http://www.flashmagazine.com/tutorials/detail/using_away3d_with_flex/

Share

, ,

1 Comment

[Flex] Printing 問題

Flex 的 printing 方面,差不多完全不能使用。

所以文中所講的 very challenging 是完全無錯的,因此,解決方法就有兩個。

1). Export as PDF.

2). Export as Image.

最好的方法,當然是export to PDF。 pdf 的printing support 是十分好的,flex 都有不少的library 可以利用. 其中,chowky 所用過的是alivepdf.

不過想簡單一點的話,就不如export as PNG 就好了,flex 很容易就可以把一個container 變做image. 你們所利用到的class 應該是 PNGEncoder. 只要想google 找一找就不難找到呢~

Source: http://www.insideria.com/2009/07/printing-with-flex.html

Share

, , , , ,

No Comments

Flex on IPhone?

flex on Iphone ,這個名好吸引,技術上是利用了flex 的framework,再重新寫了一個新的compiler 出來….

cross-platform mobile application development based on Flex,聽上去不錯。

暫時未試過真正使用,要等他們有真正的source code 推出,(chowky 當然要看看iphone 的sample app),但iphone 的 emulator又怎樣做呢? 是否能在window 上寫呢?

另外一方面連andriod 都support,聽上去都令人興奮~

如果各位有人試過的話~~可以交流一下呢~

Source: http://developer.openplug.com/

Share

, , , ,

No Comments

[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

Share

, , , , , ,

No Comments