25 December 2009

Pyco Flash Framework (Beta)

Pyco Flash Department has just released its beta version of Pyco Flash Framework (PFF). Its capabilities are demonstrated via our team’s minisite at www.pycoflash.co.cc

This framework is aim to

  • Set up a standard foundation for almost all Pyco Flash projects. I must say “almost” because some projects may not benefit from deploying PFF, especially ones that are too small and their file size is really a matter. (PFF and PureMVC take up to ~ 90 kB in the main swf).
  • Reduce the time and hassle of setting up the same project’s frame and common components over again. And therefore, reduce the effort spending on the project.
  • Drive team members to a new development approach which helps improve teamwork collaboration and source code’s maintainability

PFF features some of the latest techniques and approaches in the Flash universe:

  • Flex SDK compilation:
    • Deploy FlashCS 3/4 & Flex SDK workflow
    • Using precompiled libraries SWC extensively to separate UI and logic and to accelerate project build time
    • All SWFs are compiled using Flex SDK compiler
    • Build and deployment can be automated using build script like FlexANT, ANT, batch…
  • The framework core is based on PureMVC and Loadup utility
  • An MVC-based page manager.
    • The page manager supports external (loaded) and internal pages. Demo: Login form is an internal page (no waiting for loading). Researches' framework top page is a internal blank containing page
    • Popups are supported (special pages which appear on top of other pages) Demo: Login form is a popup
    • Custom transition for each page. Demo: Member page
    • Page redirection. Demo: Redirection from Researches top page to Research Intro
    • Linking page redirect users to an external URL. Demo: Forum
    • Page accessibilty which requires authentication. Demo: Works (who wants to see this page may contact me for the password)
    • The deeplinking module can be activated or omitted completely from project's build
    • Page system has deep linking by default (if deep linkng is activated). Demo: All pages in the demo
    • Especially, each page can implement its own sub-deeplink logic. This is an unprecedented feature which never be seen in other frameworks. Demo: Gallery page
  • Multilingual support and dynamic fonts loading. A unique text style manager which centralized all fonts assets and styles. No character is embeded twice.
  • A tracking manager which is designed to handle multiple tracking services at the same time. Trackers can be activated/deactivated completely from source code. Currently support Omniture, Webtrends and GoogleAnalytics. Future tracking services can be plugged in easily.
  • Common utilities and controls: Scrollbar, Tooltip, StringUtil, Cookies, Random...
  • Other modules and features to bundle in the framework: TBD

We are currently making the documents and API reference for it. Next step is to train every member of the team the usage of PFF.

22 December 2009

OpenZoom library & SDK

I intended to note this on twitter but afraid that it will be washed away by other tweets. So I decided to bookmark any interesting ActionScript library here in a special category: ‘libraries’

Here’s the first:

“OpenZoom SDK

The open source OpenZoom SDK is a toolkit for the Adobe Flash Platform that enables you to easily build powerful applications, beautiful sites and stunning maps which use a zooming metaphor and high-resolution images. It is freely available under the MPL/GPL/LGPL trilicense.”

Main site: http://openzoom.org/
Code: http://openzoom.org/go/code
Document API: http://docs.openzoom.org/sdk
Author’s blog: http://gasi.ch/blog

Checkout this example. (Try: + – W A S D click wheel drag)
Interestingly, there is a Vietnamese showcase: http://www.albawater.com.vn/

18 December 2009

Red5 Data Mapping

Red5 LogoWhen sending data to Red5 handlers, it is important to know the counter-part data types used in the server’s Java code.

There’s is one article mentioning about this at http://jira.red5.org/confluence/display/codecs/Data+Type+Mappings

However, for an unknown reason, the page is not accessible any more. I have to produce a test and observe the conversion of data as following:

From Flash to Red5 (valid to Red5 0.8 / 0.9)

ActionScript 3


Boolean java.lang.Boolean
String java.lang.String
uint (< 2147483647)
int (-2147483648 to below 2147483647)
Number (integer value within int range)
uint (>= 2147483647)
Number (integer value out of int range)
Number (fraction value) java.lang.Double
Date java.util.Date
Array java.util.ArrayList
Object / Custom Object org.red5.io.utils.ObjectMap
XML, XMLDocument org.apache.xerces.dom.DeferredDocumentImpl
(this class seems not to be in Red5’s lib folder)
ByteArray org.red5.io.amf3.ByteArray
Special Values:  


  • Negative integer value is limited at –2147483648 even if the variable is declared as Number. If you try to send a value less than this number, it will be rounded up to –2147483648.
  • If one of the params in the remote call is null or undefined, the handler will not be executed.