Using More than 2 own ResourceBundles Will Crash a Flex Application

When you using Flex2 framework to build your application, Flex has included several ResourceBundles for its components, validators…You can add only maximum two your own ResourceBundles in the application, otherwise it will cause error and crash the Application during initializing after loading.


index2.mxml (2 own ResourceBundles)

index.mxml (3 own ResourceBundles) (in order to prevent the error alert appear every time in debug version Flash Player, please click here to see the demo)

Another Flash Player is not cross-platform bug: multiple clipContent mask

This bug is nothing related to flash-browser communication problem, it is the different render behavior of Flash player in Windows and MAC, see the picture below (click to see original size):


I have put a box with round corner outside the panel, it can render in Windows, but cannot in MAC. The structure is consist of Application > Canvas1 > Canvas2 > Panel> Module Loader > Module > Canvas3 > Canvas4 > Box, the position of Box is outside the Panel, I have set clipContent=false in Module, Canvas3, Canvas4.

Panel will clipContent, therefore, the behavior in MAC should be correct, Windows is wrong. Since I am developed in Windows, I does not aware the problem until I was checked the site in MAC.

When I try to create a more simplified version to reproduce bug in Windows and MAC, but I can’t, Flash Player behavior correctly is both platform, content outside Panel have clipped. So it may be involved other complicated factor of my large Flex project. But I cannot put extra time to investigate this annoyed bug.

As a developer, do not trust Adobe! Flash Player is not must be cross-platform as you think!

AS1/2 escape() and AS3 escape() are different

It is not a big discoverable problem for English development, AS1/2 escape() and AS3 escape() return the same result, but in double-byte characters, AS3 escape() now return the same format as JavaScript, if you want the old AS1/2 format, you have to use encodeURI() or encodeURIComponent().

ActionScript 1/2
var a:String = "香港:";
trace(escape(a)); // %E9%A6%99%E6%B8%AF%3A

ActionScript 3
var a:String = "香港:";
trace(escape(a)); // %u9999%u6E2F%3A
trace(encodeURI(a)); // %E9%A6%99%E6%B8%AF:
trace(encodeURIComponent(a)); // %E9%A6%99%E6%B8%AF%3A

var a = "香港:";
alert(escape(a)); // %u9999%u6E2F%3A
alert(encodeURI(a)); // %E9%A6%99%E6%B8%AF:
alert(encodeURIComponent(a)); // %E9%A6%99%E6%B8%AF%3A

Thought on Japan Flex User Group Study Session

Japan Flex User Group is the most successful and largest user group in the world (check Adobe Developer Relations manager, John Koch’s article). They held Flex2 study session, discuss and share Flex2 development experience. Yesterday (2006-12-21) I join “Flex2 Study Session (12th)“, this was the first time I attend their gathering, the gathering was hold in Adobe(Japan) Tokyo Office (Google Map), it was also my first time to other Adobe Office.

The session was divided into two parts, the first part was Flex Builder development tip sharing, talking about cross debugging, Framework analysis and source code quick view technique. Study session was like a lecture, but it was not formal, attendants can speak out their idea anytime, the discussion environment was good. Study session was different from the user group gathering I attended in Hong Kong/Taiwan, even different from MAX (HK/TW). The study topicwas very small and focus, so talked in depth, it liked experienced developer debating, for example, they have talked about the difference between Java breakpoint and Flash breakpoint. The remain attendants can learn a lot during the process.

The second part was an introduction to Apollo, this was my first time to see Apollo in live. The speaker presented how to use Flex Builder to build Apollo application, demo Apollo alpha windows, irregular shape window, File I/O, HTML render, use Filter to blur or even distirt a HTML page.

Some points I found interesting:

  • Irregular shape Apollo application, the outside place underneath is still clickable. If you try other irregular shape application before, it may be actually rectangle window which underneath is impossible to click.
  • HTML page is added Filter, or even distorted, it is still operable, JavaScript can still running.
  • File I/O is completed, it can browse, list, read, delete files. It supports Binary, too. Therefore, you can write your own encoder, decoder, create your own file format.
  • However, File I/O is too powerful, if Adobe can solve security problem, Apollo cannot release.
  • The installation of Apollo application and runtime is very easy, using Flash Player to install. After installation, you can create icon on the desktop and adding shortcut in Start Menu Program Files, look like desktop softwares.
  • Apollo support hybrid of HTML+SWF, it is HTML embeds SWF or SWF embeds HTML.
  • Flex2 application, it is not necessary to use Apollo embed SWF to convert to Apollo application, you can just change mx:Application tag, add some window setting, then convert to Apollo application.
  • Apollo runtime file size is about 5Mb.
  • Someone asked is it possible an Apollo application communicates with othere application. No information yet, but I guess it is possible thought Local Connection. There was a C# talk with Flash example before.

Other photo (sorry, photo quality are not good)

▲ From JR Yamanote line (山手線) Osaki Station (大崎駅), follow the foot bridge, come to Gate City Osaki (ゲートシティ大崎)

▲ Buildings near by

▲ Large podium and lobby

▲ Arrived West Tower

▲ Outside West Tower lift lobby

▲ West Tower lift lobby

▲ Walk out, found Adobe carpet, step on the logo…(:P)

▲ Found Adobe Office is similar to Hong Kong one, same color tone

▲ Posters in Adobe Office

▲ Direction sign

▲ Enter the room, there was lot of people ready, somes bought their notebooks, too.