jul

29

pan scrolling canvasThe PanScrollingCanvas is a Flex container that scrolls its children on mouse move. Fully skinnable buttons appear when hovering over the container. The behavior of those buttons can be customized on the client side, by listening to events that this container will fire on button rollover, rollout, and click.

This component is inspired from Doug McCune’s ButtonScrollingCanvas, which is part of flexlib. Using Doug’s component, users interact with one of the four buttons laid out over the container, in order to initiate a scrolling effect–in the direction indicated by the button. I wanted to do something similar, but without relying on the buttons for scrolling the content. Here, the interaction consists of panning the mouse over the container, with a goal-based ease out to give an organic feel to it. Also, 8 directional buttons (instead of 4) are introduced for control affordance and client custom behavior.

Let’s jump to a demo, before getting to the nitty gritty…

Example: exploring Yahoo! maps

To see a full page demo (with source view), click here.

··· continue reading ···

jul

23

localizing a flex libraryThe support for multiple languages in a Flex application is well integrated in Flex 3. The Adobe documentation gives an excellent overview of the general process and the technical details associated with internationalizing your application.
The documentation, however, does not explicitly cover the case where some localized parts of your application reside in one or more Flex libraries (.swc files.) We are addressing that case here below.

A while ago, Vic on Flex had posted an article describing how to organize resource bundles and localized libraries so that one can build a localized Flex application that depends on them. The presented method produced one swc file per locale, per library, and also involved changing compilation parameters manually for each generated swc. Although the solution still works, it cannot be automated easily in FlexBuilder. Moreover, if your application requires switching locales at runtime, the resulting application’s swf file will bundle as many copies of your library as the number of locales to support.

So following up on Vic’s approach, here is a fully automated way to localize a Flex library with multiple locales in one single swc file with no overhead.

0. Check the Flex SDK
1. The resource bundles
2. The library
3. The application
4. Demo

··· continue reading ···