Color Fill in Flex

		private function fill(event:MouseEvent):void
			var data:BitmapData = Bitmap(imageObject.content).bitmapData;
			data.floodFill(event.localX,event.localY,0x00ffff);  // replace 0x00ffff with your choice of color
<mx:Image id="imageObject" source="...." click="fill(event)" />

This few lines simply fills selected or defined color to DisplayObject / Image like fill tool of any Paint tool.

Gondal – a model town

Last weekend, I visited Gondal, a famous town of Saurashtra, Gujarat. The town is located appx. 100 kilometers away from Rajkot.

Although, Gondal is having a status of town with few statistical parameters like population, infrastructure, etc. following are remarks about the town.

  • Town planning has been good since the time of Bhagawadsinhji. The roads have more than required – good enough margins and well maintained footh paths in almost every street.
  • The town is peaceful.
  • Town is rich with good institutes in variety of subjects
  • The very well famous, encyclopedia of Gujarati language – Bhagwadgomandal, had been developed by King Bhagwadsinhji. That was not a small project in any sense – collection, quality, authenticity. It is a de facto standard encyclopedia of present time, without any modification
  • The Gondal kings were fond of cars, the followers have also preserved cars in well manner. [See my photos of this visit]

Here are the photos of the visit. The photos include antic car collection too!

* Bhagwadgomandal digital downloadable edition has also been launched on 1st May, 2009.

Simple solution to a complex problem – customized Rich Text Editor

Apparently, creating customized RichTextEditor component in flex was looking time consuming. The rich APIs that flex provides made this task easier.

I retrieved reference of different styling controls from a hidden richTextEditor object, arranged them as per my requirement, and its done!

I thought to make a custom editor with customized control positions is a big task, but is not what I thought! 🙂

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="" layout="absolute" creationComplete="init()">
			import mx.controls.Button;
			import mx.controls.TextArea;
			import mx.controls.TextInput;
			import mx.controls.RichTextEditor;

			private function init():void
				var textInput:TextInput = rte.linkTextInput;
				textInput.visible = false;

				var bulletsButton:Button = rte.bulletButton;
				bulletsButton.visible = false;

				var fontFamily:DisplayObject = rte.fontFamilyCombo;
				var fontSize:DisplayObject = rte.fontSizeCombo;

				var alignBtns:DisplayObject = rte.alignButtons;

				var boldBtn:DisplayObject = rte.boldButton;
				var italicBtn:DisplayObject = rte.italicButton;
				var underlineBtn:DisplayObject = rte.underlineButton;
				var colorPicker:DisplayObject = rte.colorPicker;
				var styles:HBox = new HBox();

				var textArea:TextArea = rte.textArea;
	<mx:VBox id="controls" width="250" height="100">
		<mx:HBox id="font" />
		<mx:HBox id="effects" />
	<mx:Panel id="editor1" x="300" width="300" height="300"/>
	<mx:RichTextEditor id="rte" visible="false" />

Summer Programmes @ VASCSC

Vikram A sarabhai Community Science Center, Ahmedabad has announced schedule for special programmes for this Summer – 2009.

Click below image to enlarge.

Program Page1Program Page 2

VASCSC is really a wonderful place to learn and have lot of experiments.

It had been my favorite place to hang and do experiments in vacation time during my school days.

I highly recommend at least a visit to this organisation.

Wake Up call for Indian Consumers

CERC has started consumer grievance helpline – 1800-233-0222. This helpline is toll free for BSNL Gujarat users.

This is really a welcome step by CERC in association with Consumer Affairs, Government of Gujarat. This helpline is available from 10.30 AM to 5.30 PM as per IST. (GMT +530)

CERC is very reputed non profit NGO serving and solving sonsumer complaints / grievance for its members. Its membership detail is here. You can become member by paying online instead.

To add few lines about the organisation’s prestigeous standing I can summarise few of my experiences:

  • When Vodafone Essar was Hutch, in undisclosed billed amount about Rs.500 for my postpaid mobile connection, I requested for justification and company ignored. I stopped using mobile services by paying genuine amount along with accounting statement which was genuine. Later, the company sent a legal notice that drove me to CERC. I have been member since then. CERC did some correspondance on my behalf. Company failed to respond and that proved the legal notice was no more legally valid or important!

  • HP refused to replace damaged front panel, damaged due to its design defect. Legally and as per company’s terms it is possible to replace such parts under cosmetic damaged parts category. Again, approaching CERC solved, front panel get replaced without any legal procedure.

  • In the matter of unsolicited call from ICICI Bank, I did some correspondence with bank and just by sending copy of the same to CERC taught the bank. The bank sent letter of forgiveness through courier!

Some points about CERC:

  • Complaint department listens and guides to complaint very genuinly. Consumer can feel free to express whatever his / her experience is / was.

  • Complaint department has very systemetic approach from receiving and registering complaints from its members to dealing with associated parties / business houses.

  • Genuine complaint can be registered through email to CERC as well. CERC’s method for dealing with non local complaint is really appreciative.

  • Insight, a bimonthly magazine from CERC is really worth to read. It is a leading publication in India for consumer awareness.

  • One membership serves complaint registered by his / her family members. (of course, not a joint family! :P)

  • Membership fees are normal or perhaps nominal for the kind of activities CERC does.

  • Most importantly, an Indian can be a member, get free Insight magazine and register for grievance too.

  • Different consumer product surveys carried & published by CERC are added advantage for consumers.

I highly recommend to become member of CERC, to boost its activities, to have Insight knowledge of consumer laws and if required to solve your complaints being a consumer.

How to read Mobile Feed / QR Code?

QR Code requires special software installed on your mobile to interpret the matrix / image.

The content of mobile feed are encoded and represented in 2 dimensional image in a small area.

You can get suitable QR Reader for your mobile device from Kaywa Reader.  or search google for similar softwares.

This is a good option to store contents on mobile very quickly and use as offline read.

Holi – color-full festival

Let’s play Holi the Mozilla way…..

Let’s see the colors of the world from an eye of Mozilla (Firefox)

Let’s greet by a postman from Mozilla (Thunderbird)


Let’s play Holi in simple, safe way….. with only gulaal, no artificial color / paint.

Bus time table – an SMS away!

GSRTC has already started time table (schedule) search service by SMS since August, 2007.
I also had heard about this, but haven’t come across more details.

Today I found two things:
1. Time Table and other services are available online, through GSRTC website.
2. You can search buses running between <source> and destination by sending an SMS : <type> <source> to <destination> : to 09998805656.

<type> may be either of following
– ignore this field if you wish to find any kind of bus.
– luxury

e.g. ahmedabad to baroda send to 09998805656
or luxury ahmedabad to anand to 09998805656

If you know exact and more details about the SMS format, feel free to share.

The SMS service is really very useful and is very prompt. Also, being an SMS, gives most immediate 5 bus routes belonging to <source> to <destination> based on the time SMS was sent.

I highly appreciate this way to promote public transport. The idea is simply superb.

A Deewar dialogue between IT guys

Today evening I was chatting with my colleagues in break time.
Suddenly one of them said something and I created an IT version of famous Hindi movie – Deewar. This makes more sense during present scenario of recession.

Amitabh Bachchan : “Mere paas…
4 GB RAM hai,
3MB L2, 2.53 GHz, 1066 MHz ka Intel Core2 Duo processor hai,
21″ LCD Monitor hai,
300GH ki Hard Disk hai,
Logitech ka Optical mouse hai,
LightScribe aur BlueRay waalaa DVD writer hai,

Flex Builder 3 ka license hai,
Windows Vista ka license hai,
4MBPS ka Internet connection hai,

Tumhare paas kya hai?

Shashi Kapoor : “Mere paas nayaa project hai!

IT Managers

I have come across a few managers, in IT industry. Although I do not like theories of management much, but still I believe there is some scientific and psychological truth is there.

Here I am not writing these theories, but expressing how an action can give positive or negative reaction. Of course, this post had been saved as draft quiet a long time ago, now draft is in the form of new post.

Few managers tend to act being a superior authority. They often forget basic fundamentals of successful management – punctualness, responsiveness and co-operativeness, etc.

Few lac attitude of encouragement. I have observed at many places that lac of encouragement decreases the throughput of a single person at major level. This can be even more in mass. Managers are meant to get the work done, smartly.

Torturing behavior also affects output. Often, these situation arises when managers fail (of course, themselves) to understand what the subordinates thinks like. They fail to catch opportunities to have co-workers’ and subordinates’ views. These situations often end in harsh behavior or chaotic situations at worse.

‘Psycho’ manager often forgets that subordinate is after all a human being, a social animal, a creature! (This statement reminds me of someone, I interacted with during my last phase of Post Grad study!!! :p)

Managers should not be damagers!

Also, I have seen few managers who are really down to Earth, although being at management cum technical level.

Simple encouragement pours enthusiasm to juniors, subordinates and co-workers too!

Regular feedback and interation between IT managers and colleagues often reduces some pressure about achieving targets.

Also, more the freedom given to the employees (of course, with control),  better the output is  Any how, employees also need to manage their tasks!

A golden line that I believe – a true manager is a person with whom no subordinate feels aftraid of to interact, anytime. This makes sense when interaction increases to solve problems, with less efforts.

%d bloggers like this: