Archive for the ‘ Flex ’ Category

SmartFox and SQL Server 2005 Connection

For Java 1.6

Downloaded Microsoft SQL Server JDBC Driver 3.0

copy sqljdbc4.jar to SmartFoxServerPRO_1.6.6\jre\lib\ext

Remove sqljdbc.jar or else error while starting server to put sqljdbc4.jar

Change config.xml for zone you need to create extension for.

<DatabaseManager active=”true”>







Set your connection type to active=true in order to excute DB ..

check sample application from smartfoxServerDoc


Multiton/singleton AS3 for Modules Flex / PureMvc / Fabrication

Hi Friends,

Was wondering how to reference a singleton instance for particular Module in flex..

after reading few blog and googling ..

found a solution/rather built upon it .. thought this might be helpful to somebody…

Most things in AS are built on Java so Looked at Java Mulitone >> and there is the solution…


    import flash.utils.Dictionary;

    public class InternalModelLocator
		private static var instances:Dictionary= new Dictionary();//Dictionary is treated as Java Hash Map

		public function InternalModelLocator()
                   /* Only One Instance created with GetInstanceMethod*/

		/* module_uuid can be a String --------
                   In case of PureMVC "multitonKey" (this.multitonKey) can be used as unique key for multiple modules
		public static function getInstance(module_uuid:String):InternalModelLocator
			var instance:InternalModelLocator = instances[module_uuid];

			if(instance == null)
				instance = new InternalModelLocator();
				instances[module_uuid] = instance;
			return instance;



Let me know if I miss some thing or needs more elboration….

Challeges for Flex Developers

Hi All,

Check this All, Time to Earn Some guddies.


Ranjit Sail

Tour De Flex

Tour de Flex is a desktop application for exploring Flex capabilities and resources, including the core Flex components, Adobe AIR and data integration, as well as a variety of third-party components, effects, skins, and more.

Download is approx 50MB
Manual install – download the AIR file directory from here
Tour de Flex runs on Adobe AIR on Windows, Mac OS and Linux
User Guide (PDF)

Tour de Flex has three primary purposes:

Provide non-Flex developers with a good overview of what is possible in Flex in a “look and see” environment

Provide Flex developers with an illustrated reference tool

Provide commercial and non-commercial Flex developers a place to showcase their work

Tour de Flex includes over 200 runnable samples, each with source code, links to documentation, and other details. Topics include the Flex Core Components, Flex Data Access, AIR Desktop Capabilities, Cloud APIs, Data Visualization, Mapping, and a growing collection of custom components, effects, skins, etc.


Tour de Flex Eclipse Plugin

An Eclipse plugin is available that provides a search interface to the 200+ samples in Tour de Flex. Search by component name, tag or author and double-click any item in the results to immediately see the component in Tour de Flex.

To install the plugin, add the following URL to your Eclipse software update sites: Once installed, a new Tour de Flex view is available to add. The plugin has been tested with Eclipse 3.4 and with Flex Builder 3.x.


Showcasing your Flex work in Tour de Flex

One of the objectives of Tour de Flex is to provide a place for developers to showcase their work. We are always looking for new samples to add.

To have your work included in Tour de Flex, follow these steps:

Create demos of your work that look good within the Tour de Flex size constraints (663×246 when not expanded)

Arrange to have all assets hosted

Convert the source code to a color HTML document. You can use Flex Builder’s “View Source” feature to generate the HTML files.

Complete the sample submission form.



If you have suggestions for Tour de Flex or wish to report a bug, please post to the Flex Forum at


Share Tour de Flex!

You can help spread the word about Tour de Flex by using the following HTML to embed the install badge in your website: Click here

Change Color, weight , font size of tree node

 Write a Actionscript class which extends “TreeItemRenderer” as below, and use this class in ur tree tag as

<mx:Tree id=”tree” itemRenderer=”MyTreeItemRenderer ” />


Actionscript class
 import mx.controls.treeClasses.*;
 import mx.collections.*;
public class MyTreeItemRenderer extends TreeItemRenderer
                public function MyTreeItemRenderer() 
                        mouseEnabled = false;
               override public function set data(value:Object):void
               = value;
                        if(TreeListData (super.listData).hasChildren)
                           setStyle(“color”, 0xff0000);
                              setStyle(“fontWeight”, ‘bold’);
                           setStyle(“color”, 0x000000);
                          setStyle(“fontWeight”, ‘normal’);


             override protected function updateDisplayList(unscaledWidth:Number, 
                  super.updateDisplayList(unscaledWidth, unscaledHeight);
                                var tmp:XMLList = new XMLList(TreeListData(super.listData).node);
                                var myStr:int =tmp[0].children().length();
                                super.label.text = TreeListData(super.listData).text + “(” + myStr + “)”;



Ranjit Sail