Flex, ActionScript and Related Stuffs

Enjoy!!!!

Archive for June, 2007

Want a better Color Scheme? Try Kuler

Posted by flexrays on June 27, 2007

I am really bad at choosing a color sheme for websites and flex components. I have tried building websites with colors which I thing will suit the purpose. But I have not been successful at this till now as my websites look awful.

When I was browsing through the web, I found a mention of Kuler on ScaleNine. This is what i wanted from a long time. I am not sure how many people will find Adobe’s Kuler interesting and useful, but it is indeed a very useful website to me. Adobe has made my life easier.

There is also a mention of other websites of the similar concept, Daily Color Scheme (http://beta.dailycolorscheme.com/) and Color Scheme Tool (http://www.steeldolphin.com/color_scheme.html).

Posted in SkinAndStyle | 1 Comment »

Roundtable discussion with Duane Nickull

Posted by flexrays on June 25, 2007

Duane, Senior Standards Strategist, Adobe System Inc was supposed to give a talk on “Rich Internet Applications” on 22nd Friday 2007. I was really exited to attend this discussion and meet Duane.

I reached the hotel, Taj West End, after struggling my way through the traffic and rain. Even though not much of technical discussion could happen that day due to less attendees, I got a chance to meet Duane. Duane is a nice person.

I am still waiting for a picture with Duane and Prayank so that I can put it up on my blog. I hope that Adobe arranges more of these types of discussions where we could meet the senior people from adobe. Thanks Prayank.

Posted in Flex | 1 Comment »

Singleton Pattern

Posted by flexrays on June 20, 2007

One of the design patterns in the Object-Oriented-Programming languages like ActionScript 3.0.
The Singleton design pattern is used to limit a class to one instance and provide global access to that instance
Common examples include classes that manage resources that are intrinsically singular such as

1. Selection focus
2. Navigation history
3. Window depth
4. Class that manages the state of user’s cursor
5. Class that loads application setting from an XML file and provide access to those settings

Essential features of Singleton class

• A private static property that holds the single instance of the class
• A public static method that provides access to the single instance if it’s created and creates the single instance if it hasn’t been created yet
• A way of restricting access to instantiating the class

Example – Creating a Singleton

package
{
public class MyClass
{
private static var _instance:MyClass

public function MyClass(enforcer:SingletonEnforcer)
{

}
public static function getInstance():MyClass
{
if(MyClass._instance == null)
{
MyClass._instance = new MyClass(new SingletonEnforcer());
}
}
}
}

class SingletonEnforcer {}

Invoking a Singleton inside another class
MyClass.getInstance()

Posted in Flex | 4 Comments »