Archives for categorie "General"

Applications which need extra security in Flex can use data encrypting. This system must encrypt data in server (Java) and transmit it encrypted so only client system (Flex) could decrypt them. In the inverse process, client encrypts data to send it to the server. Thus we guarantee secure data transfer.

There are few system of asymmetric encryption you can use and they are available with some Flex encryption libraries:

This example use as3crypto (AES of 128bits) because is a complete solution and offers a great demo:


Source codeClick with the right button to obtain source code.

Tutorials: Encryption in Flex Applications 3 - NitroLM SWF Encryption, Encrypt in Flex and Decrypt in ColdFusion y Encryption in Flex Applications 2 - SWC AS3 Library Encryption

Seed must be generete dinamically in Flex as in Java to avoid interceptions.

  • Share/Bookmark

ComboCheck is a Flex component which extends ComboBox class and display CheckBox as itemRenderer with multiple selection.

It provide selectedItems property to store provided object in the ComboBox dataProvider and selected by the CheckBox.


Source codeClick with the right button to obtain source code.

  • Share/Bookmark

To get links list by category in Wordpress you must use the new function (Wordpress 2.1+) wp_list_bookmarks (instead of get_links) but ‘category’ argument doesn’t work fine and you must use ‘category_name’. Code looks like:

    <?php wp_list_bookmarks('title_li=&categorize=0&category_name=amigos'); ?>

More information about this function in Wordpress.

  • Share/Bookmark

Although localToGlobal works fine its references is not valid with itemRenderes and we must use:

public function getAbsolutePosition(element:*):Point {
   var position:Point=new Point (element.x,element.y);
   // Check for Panel
   if (element is Panel) {
           var panel:Panel=Panel(element);
           var panelHeight:int=panel.getStyle('headerHeight');
           if (panelHeight==0) {
               panelHeight=30;
           }
           position.x=panel.getStyle('borderThicknessLeft');
           position.y+=panelHeight;
   }
   if (element.parent!=Application.application && element.parent!=null) {
           var tmp:Point=getAbsolutePosition(element.parent);
           position.x+=tmp.x;
           position.y+=tmp.y;
   }
   return position;
}
  • Share/Bookmark
  • Include as3localelib library in the project to use LocaleUtil.sortLanguagesByPreference() function, it gets ordered locale list by preference.
  • Use property Capabilities.language (and Capabilities.languages on Air) to obtain client language in use.
  • Add the tag of file translation:
    <mx:Metadata>
    [ResourceBundle("ResourceFileName")]
    </mx:Metadata>
  • And get location as:
    resourceManager.getString('ResourceFileName','myLabel')
  • Check for translation resources in the SDK framework of Flex for every locale. Generate it using copylocale original_locale new_locale.
  • If the locale folder overlap source folder, use directive -allow-source-path-overlap=true (on configuration xml use true).
  • Manage loading events in external modules with loadResourceModule() (ResourceEvent.PROGRESS, ResourceEvent.COMPLETE y ResourceEvent.ERROR). Only in dynamic localization.
  • Generate translation modules (files .swf) to load. Only in dynamic localization.
  • Check it in the browser changing the locale (on Mac you can change language in preferences pane and restart the browser).

More information in Adobe LiveDoc.

  • Share/Bookmark
Creative Commons License
This blog is under Creative Commons licence, unless indicated otherwise.
Special thanks to Mark James for the icon set used in this blog.