<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Flex @ Fun</title>
	<atom:link href="http://skr4u.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://skr4u.wordpress.com</link>
	<description>Flex custom API</description>
	<lastBuildDate>Mon, 11 Jul 2011 07:42:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='skr4u.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Flex @ Fun</title>
		<link>http://skr4u.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://skr4u.wordpress.com/osd.xml" title="Flex @ Fun" />
	<atom:link rel='hub' href='http://skr4u.wordpress.com/?pushpress=hub'/>
		<item>
		<title>User Interface Design Principles</title>
		<link>http://skr4u.wordpress.com/2011/04/11/user-interface-design-principles/</link>
		<comments>http://skr4u.wordpress.com/2011/04/11/user-interface-design-principles/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 06:54:02 +0000</pubDate>
		<dc:creator>skr4u</dc:creator>
		
		<guid isPermaLink="false">http://skr4u.wordpress.com/?p=59</guid>
		<description><![CDATA[Some of UI design interface which we should follow in UI design and development prototype The structure principle. Your design should organize the user interface purposefully, in meaningful and useful ways based on clear, consistent models that are apparent and recognizable to users, putting related things together and separating unrelated things, differentiating dissimilar things and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skr4u.wordpress.com&amp;blog=7124168&amp;post=59&amp;subd=skr4u&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some of UI design interface which we should follow in UI design and development prototype</p>
<ol>
<li><strong>The structure principle</strong>. Your design should  	organize the user interface purposefully, in meaningful and useful ways  	based on clear, consistent models that are apparent and recognizable to  	users, putting related things together and separating unrelated things,  	differentiating dissimilar things and making similar things resemble one  	another. The structure principle is concerned with your overall user  	interface architecture.</li>
<li><strong>The simplicity principle</strong>. Your design should  	make simple, common tasks simple to do, communicating clearly and simply in  	the user’s own language, and providing good shortcuts that are meaningfully  	related to longer procedures.</li>
<li><strong>The visibility principle</strong>. Your design should  	keep all needed options and materials for a given task visible without  	distracting the user with extraneous or redundant information. Good designs  	don’t overwhelm users with too many alternatives or confuse them with  	unneeded information.</li>
<li><strong>The feedback principle</strong>. Your design should keep  	users informed of actions or interpretations, changes of state or condition,  	and errors or exceptions that are relevant and of interest to the user  	through clear, concise, and unambiguous language familiar to users.</li>
<li><strong>The tolerance principle</strong>. Your design should be  	flexible and tolerant, reducing the cost of mistakes and misuse by allowing  	undoing and redoing, while also preventing errors wherever possible by  	tolerating varied inputs and sequences and by interpreting all reasonable  	actions reasonable.</li>
<li><strong>The reuse principle</strong>. Your design should reuse  	internal and external components and behaviors, maintaining consistency with  	purpose rather than merely arbitrary consistency, thus reducing the need for  	users to rethink and remember.</li>
<li><strong>Consistency, consistency, consistency</strong>. I believe the most  	important thing you can possibly do is ensure your user interface works  	consistently. If you can double-click on items in one list and have  	something happen, then you should be able to double-click on items in any  	other list and have the same sort of thing happen. Put your buttons in  	consistent places on all your windows, use the same wording in labels and  	messages, and use a consistent color scheme throughout. Consistency in your  	user interface enables your users to build an accurate mental model of the  	way it works, and accurate mental models lead to lower training and support  	costs.</li>
<li><strong>Set standards and stick to them</strong>. The only way you can ensure  	consistency within your application is to set user interface design  	standards, and then stick to them.  You should or may follow other standard like Agile Modeling (AM)’s 	<a href="http://www.agilemodeling.com/practices.htm#ApplyModelingStandards"> Apply Modeling Standards</a> practice in all aspects of software  	development, including user interface design.<strong></strong></li>
<li><strong>Navigation within a screen is important</strong>. In Western societies,  	people read left to right and top to bottom. Because people are used to  	this, should you design screens that are also organized left to right and  	top to bottom when designing a user interface for people from this culture?  	You want to organize navigation between widgets on your screen in a manner  	users will find familiar to them.<strong></strong></li>
<li><strong>Word your messages and labels effectively</strong>. The text you display  	on your screens is a primary source of information for your users. If your  	text is worded poorly, then your interface will be perceived poorly by your  	users. Using full words and sentences, as opposed to abbreviations and  	codes, makes your text easier to understand.  Your messages should be worded  	positively, imply that the user is in control, and provide insight into how  	to use the application properly. For example, which message do you find more  	appealing “You have input the wrong information” or “An account number  	should be eight digits in length.” Furthermore, your messages should be  	worded consistently and displayed in a consistent place on the screen.  	Although the messages “The person’s first name must be input” and “An  	account number should be input” are separately worded well, together they  	are inconsistent. In light of the first message, a better wording of the  	second message would be “The account number must be input” to make the two  	messages consistent<strong>.</strong></li>
<li><strong>Understand the UI widgets</strong>. You should use the right widget for  	the right task, helping to increase the consistency in your application and  	probably making it easier to build the application in the first place. The  	only way you can learn how to use widgets properly is to read and understand  	the user-interface standards and guidelines your organization has adopted.<strong></strong></li>
<li><strong>Look at other applications with a grain of salt</strong>. Unless you know  	another application has been verified to follow the user interface-standards  	and guidelines of your organization, don’t assume the application is doing  	things right. Although looking at the work of others to get ideas is always  	a good idea, until you know how to distinguish between good user interface  	design and bad user interface design, you must be careful. Too many  	developers make the mistake of imitating the user interface of poorly  	designed software.<strong></strong></li>
<li><strong>Use color appropriately</strong>. Color should be used sparingly in your  	applications and, if you do use it, you must also use a secondary indicator.  	The problem is that some of your users may be color blind and if you are  	using color to highlight something on a screen, then you need to do  	something else to make it stand out if you want these people to notice it.  	You also want to use colors in your application consistently, so you have a  	common look and feel throughout your application.<strong></strong></li>
<li><strong>Follow the contrast rule</strong>. If you are going to use color in your  	application, you need to ensure that your screens are still readable. The  	best way to do this is to follow the contrast rule: Use dark text on light  	backgrounds and light text on dark backgrounds. Reading blue text on a white  	background is easy, but reading blue text on a red background is difficult.  	The problem is not enough contrast exists between blue and red to make it  	easy to read, whereas there is a lot of contrast between blue and white.<strong></strong></li>
<li><strong>Align fields effectively.</strong> When a screen has more than one editing  	field, you want to organize the fields in a way that is both visually  	appealing and efficient. I have always found the best way to do so is to  	left-justify edit fields: in other words, make the left-hand side of each  	edit field line up in a straight line, one over the other. The corresponding  	labels should be right-justified and placed immediately beside the field.  	This is a clean and efficient way to organize the fields on a screen.<strong></strong></li>
<li><strong>Expect your users to make mistakes</strong>. How many times have you  	accidentally deleted some text in one of your files or deleted the file itself?  	Were you able to recover from these mistakes or were you forced to redo  	hours, or even days, of work? The reality is that to err is human, so you  	should design your user interface to recover from mistakes made by your  	users.<strong></strong></li>
<li><strong>Justify data appropriately</strong>. For columns of data, common practice  	is to right-justify integers, decimal align floating-point numbers, and to  	left-justify strings.<strong></strong></li>
<li><strong>Your design should be intuitable</strong>. In other words, if your users  	don’t know how to use your software, they should be able to determine how to  	use it by making <a href="http://www.asktog.com/papers/raskinintuit.html"> educated guesses</a>. Even when the guesses are wrong, your system should  	provide reasonable results from which your users can readily understand and  	ideally learn.<strong></strong></li>
<li><strong>Don’t create busy user interfaces</strong>. Crowded screens are difficult  	to understand and, hence, are difficult to use. 	<a href="http://www.amazon.com/exec/obidos/ASIN/0120958112/ambysoftinc/104-5066916-9969502"> Experimental results</a> show that the overall density of the screen should  	not exceed 40 percent, whereas local density within groupings should not  	exceed 62 percent.<strong></strong></li>
<li><strong>Group things effectively</strong>. Items that are logically connected  	should be grouped together on the screen to communicate they are connected,  	whereas items that have nothing to do with each other should be separated.  	You can use white space between collections of items to group them and/or  	you can put boxes around them to accomplish the same thing.<strong></strong></li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/skr4u.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/skr4u.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/skr4u.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/skr4u.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/skr4u.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/skr4u.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/skr4u.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/skr4u.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/skr4u.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/skr4u.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/skr4u.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/skr4u.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/skr4u.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/skr4u.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skr4u.wordpress.com&amp;blog=7124168&amp;post=59&amp;subd=skr4u&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://skr4u.wordpress.com/2011/04/11/user-interface-design-principles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad953cc3c0c82e298aabbfdd95cca3fd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">skr4u</media:title>
		</media:content>
	</item>
		<item>
		<title>How to optimize flash player performance</title>
		<link>http://skr4u.wordpress.com/2010/01/26/how-to-optimize-flash-player-performance/</link>
		<comments>http://skr4u.wordpress.com/2010/01/26/how-to-optimize-flash-player-performance/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 13:54:25 +0000</pubDate>
		<dc:creator>skr4u</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[How to optimize flash player performance]]></category>

		<guid isPermaLink="false">http://skr4u.wordpress.com/?p=55</guid>
		<description><![CDATA[few guidelines which you need to take case while making flash animation to keep healthy performance of flash player When creating animation sequences, use tweened animations, whenever possible. These animations use less file space than a series of keyframes. For animation sequences, use movie clips instead of graphic symbols. Use symbols, animated or otherwise, for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skr4u.wordpress.com&amp;blog=7124168&amp;post=55&amp;subd=skr4u&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div><span style="text-decoration:underline;">few guidelines which you need to take case while making flash animation to keep healthy performance of flash player</span></div>
<ul>
<li>When creating animation sequences, use tweened animations, whenever possible. These animations use less file space than a series of keyframes.</li>
<li>For animation sequences, use movie clips instead of graphic symbols.</li>
<li>Use symbols, animated or otherwise, for every element that appears more than once.</li>
<li>Limit the area of change in each keyframe; make the action take place in as small an area as possible.</li>
<li>Avoid animating bitmap elements; use bitmap images as background or static elements.</li>
<li>For sound, use MP3, the smallest sound format, whenever possible.</li>
<li>Group elements as much as possible.</li>
<li>Do not assign unnecessary frame label property.</li>
<li>Always use key frame label instead of using frame name if required.</li>
<li>Always use symbol to mask a layer instead of shape object if possible.</li>
<li>Try to use less mask layers and utilize to achieve more tasks using single mask layer.</li>
<li>Remove all unused layer including all guide layer.</li>
<li>Use layers to separate elements that change during the animation from those that do not. Once the animation scope of an object is finished shift that object to a static layer so that the available pointer of that layer in memory can be used to store other animated or non animated object information. Remember that once you create a layer it takes same memory space as a static variable and work as a pointer in same way as work in c and c++. Flash is weak in removing objects from memory and sending to GC when an object is not in used also weak to assign an object to blank available pointer.</li>
<li>Use Modify &gt; Curves &gt; Optimize to minimize the number of separate lines that are used to describe shapes.</li>
<li>Never assign unused linkage property to any symbol.</li>
<li>Limit the number of special line types, such as dashed, dotted, ragged, and so on. Solid lines require less memory. Lines created with the Pencil tool require less memory than brush strokes.</li>
<li>Limit the number of fonts and font styles. Use embedded fonts sparingly because they increase file size.</li>
<li>For Embed Fonts options, select only the characters needed instead of including the entire font.</li>
<li>Use the Color Mixer (Window &gt; Color Mixer) to match the color palette of the document to a browser-specific palette.- Use gradients sparingly. Filling an area with gradient color requires about 50 bytes more than filling it with solid color.</li>
<li>Use alpha transparency sparingly because it can slow playback.</li>
<li>Use the Color menu in the Symbol Property inspector to create many instances of a single symbol in different colors.</li>
<li>Use runtime filters sparingly. If you can turn it into a raster graphic with those filters, it will likely be a smoother animation. This will be a delicate balance between file size and performance.</li>
<li>Use motion tweens instead of shape tweens whenever possible.</li>
<li>Don&#8217;t have transparent things on top of transparent things. When transparencies overlap, the processor usage multiplies.</li>
<li>Keep your frames per second at or below 30. I&#8217;ve seen many applications trying to run at 60+ fps. I usually set my applications at around 24.</li>
<li>Use easing only where you need it because it eats number of CPU usage.</li>
<li>Learn about cacheAsBitmap. This can speed things up or make them slower, it depends on the context. If you have an animation, keep cacheAsBitmap as false, the cached bitmap will have to be regenerated every time the animation changes, so this isn&#8217;t worth it. However, on a vector graphic that doesn&#8217;t change within itself, cacheAsBitmap might be a good choice.</li>
<li>Avoid using transparency (alpha). Flash must check all pixels underneath a transparent shape, which slows rendering down considerably. To hide a clip, set its visible property to false rather than setting the alpha property to 0. That is, graphics render fastest when their alpha is set to 100. Setting the movie clip&#8217;s timeline to an empty keyframe (so that the movie clip has no content to show) is usually an even faster option. Sometimes Flash still tries to render invisible clips; move the clip off stage by setting its x and y properties to, say, (-1000, -1000), in addition to setting the visible property to false, so Flash doesn&#8217;t try to draw it at all</li>
<li>Avoid using vectors with gradient fills. Consider using a bitmapped gradient instead.</li>
<li>Flash&#8217;s drawing performance is tied to how many points are drawn per frame. Always optimize shapes after you have drawn them with the Modify Shape submenu, then select either Smooth, Straighten, or Optimize (depending on your graphic) to reduce the number of points required to draw it. Changing strokes to hairlines (or not using strokes at all) can also significantly reduce the number of points needed. You can view the number of points contained in a stroke byclicking on it with the Subselection tool, and you can see the number of points in a shape by clicking on any of its edges.
<ul>
<li>Flash&#8217;s drawing performance is also tied to the number of pixels that have to change per frame, so avoid large changes. Make your animated content as small as you can get away with; for example, reducing the size of a graphic by 10% in each dimension reduces the area by 19%. The savings really add up when using multiple copies of the symbol, such as for a Space Invaders game.</li>
</ul>
</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/skr4u.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/skr4u.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/skr4u.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/skr4u.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/skr4u.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/skr4u.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/skr4u.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/skr4u.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/skr4u.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/skr4u.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/skr4u.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/skr4u.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/skr4u.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/skr4u.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skr4u.wordpress.com&amp;blog=7124168&amp;post=55&amp;subd=skr4u&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://skr4u.wordpress.com/2010/01/26/how-to-optimize-flash-player-performance/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad953cc3c0c82e298aabbfdd95cca3fd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">skr4u</media:title>
		</media:content>
	</item>
		<item>
		<title>flex utility class</title>
		<link>http://skr4u.wordpress.com/2009/04/01/flex-utility-class/</link>
		<comments>http://skr4u.wordpress.com/2009/04/01/flex-utility-class/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 05:09:22 +0000</pubDate>
		<dc:creator>skr4u</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[flex util class]]></category>

		<guid isPermaLink="false">http://skr4u.wordpress.com/2009/04/01/flex-utility-class/</guid>
		<description><![CDATA[Hi, Even we have many native util classes available in flex but there are few API&#8217;s which we required in almost every application. I have written a class which provides many useful API&#8217;s&#8230; package com.aramco.iplant.utils { import flash.xml.XMLDocument; import flash.xml.XMLNode; import mx.collections.ArrayCollection; import mx.collections.Sort; import mx.collections.SortField; import mx.controls.DataGrid; import mx.controls.dataGridClasses.DataGridColumn; import mx.rpc.xml.SimpleXMLDecoder; import mx.rpc.xml.SimpleXMLEncoder; /** [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skr4u.wordpress.com&amp;blog=7124168&amp;post=53&amp;subd=skr4u&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Even we have many native util classes available in flex but there are few API&#8217;s which we required in almost every application.<br />
I have written a class which provides many useful API&#8217;s&#8230;</p>
<p>package com.aramco.iplant.utils {<br />
	import flash.xml.XMLDocument;<br />
	import flash.xml.XMLNode;</p>
<p>	import mx.collections.ArrayCollection;<br />
	import mx.collections.Sort;<br />
	import mx.collections.SortField;<br />
	import mx.controls.DataGrid;<br />
	import mx.controls.dataGridClasses.DataGridColumn;<br />
	import mx.rpc.xml.SimpleXMLDecoder;<br />
	import mx.rpc.xml.SimpleXMLEncoder;</p>
<p>	/**</p>
<ul>
<li>Util class</li>
<li>* */</li>
</ul>
<p>	public class FlxUtil {</p>
<p>		/**</p>
<ul>
<li>@public</li>
<li>@param &#8211; [Object - DataGrid, ...rest]</li>
<li>@return &#8211; [Nothing]</li>
<li>@des &#8211; API simply add necessary columns to provided datagrid reference</li>
<li>* */</li>
</ul>
<p>		public static function createDataGridColumns(dg : DataGrid, &#8230; args) : void {<br />
    		var cols : Array = new Array();<br />
			var c1:DataGridColumn;<br />
			for (var i:uint = 0; i &lt; args.length; i++){<br />
				var columnData : Array = args[i];<br />
				var columnDataField : String = columnData[0];<br />
				var columnHeaderText : String = columnData[1];<br />
				c1 = new DataGridColumn();<br />
        		c1.dataField = columnDataField;<br />
        		c1.headerText = columnHeaderText<br />
        		cols.push(c1);<br />
    		}<br />
    		dg.columns = cols;<br />
		}</p>
<p>		// search an ArrayCollection for a property on an object<br />
		public static function getItemIndexByProperty(array : ArrayCollection, property : String, value : String) : Number {<br />
			var index : Number;<br />
			for (var i:Number = 0; i &lt; array.length; i++){<br />
				var obj:Object = Object(array[i])<br />
			    if (obj[property] == value){<br />
			    	index = i;<br />
			    }else{<br />
			   		index = -1;<br />
			    }<br />
			}<br />
			return index;<br />
		}</p>
<p>		/**</p>
<ul>
<li>@public</li>
<li>@param &#8211; [Object - dataprovider, String - labelfield/datafield]</li>
<li>@return &#8211; Object</li>
<li>@des &#8211; API returns sorted data as Object</li>
<li>* */</li>
</ul>
<p>		public static function sort(data : Object, field : String) : Object {<br />
			var sf : SortField = new SortField(field, true, false, null)<br />
            var sort:Sort = new Sort();<br />
            sort.fields = [sf];<br />
            data.sort = sort;<br />
            data.refresh();<br />
            return data;<br />
		}</p>
<p>		/**</p>
<ul>
<li>@public</li>
<li>@param &#8211; [String - you want to search in, String - you want to search, String - you want to replace with]</li>
<li>@return &#8211; String</li>
<li>@des &#8211; API simply search and replace with provided args</li>
<li>* */</li>
</ul>
<p>		public static function searchAndReplace(holder : String, searchfor : String, replacement : String) : String {<br />
			var temparray:Array = holder.split(searchfor);<br />
			holder = temparray.join(replacement);<br />
			return (holder);<br />
		}</p>
<p>		/**</p>
<ul>
<li>@public</li>
<li>@param &#8211; [XML]</li>
<li>@return &#8211; ArrayCollection</li>
<li>@des &#8211; API will convert any XML object to ArrayCollection and returns same</li>
<li>* */</li>
</ul>
<p>		public static function xmlToArrayCollection(xml : XML) : ArrayCollection {</p>
<p>            var xmlDoc : XMLDocument = new XMLDocument(xml.toString());<br />
           	var decoder : SimpleXMLDecoder = new SimpleXMLDecoder(true);<br />
            var resultObj : Object = decoder.decodeXML(xmlDoc);<br />
            var ac : ArrayCollection = new ArrayCollection(resultObj.root.list.source.item as Array);<br />
            return ac;<br />
		}</p>
<p>		/**</p>
<ul>
<li>@public</li>
<li>@param &#8211; [Object]</li>
<li>@return &#8211; XML</li>
<li>@des &#8211; API will convert any proxy object to XML and returns same</li>
<li>* */</li>
</ul>
<p>		public static function objectToXML(obj : Object) : XML {<br />
            var qName : QName = new QName(&#8220;root&#8221;);<br />
            var xmlDocument : XMLDocument = new XMLDocument();<br />
            var simpleXMLEncoder : SimpleXMLEncoder = new SimpleXMLEncoder(xmlDocument);<br />
            var xmlNode : XMLNode = simpleXMLEncoder.encodeValue(obj, qName, xmlDocument);<br />
            var xml : XML = new XML(xmlDocument.toString());<br />
            return xml;<br />
		}</p>
<p>		/**</p>
<ul>
<li>@public</li>
<li>@param &#8211; [Object]</li>
<li>@return &#8211; ArrayCollection</li>
<li>@des &#8211; API will convert any Object to ArrayCollection and returns same</li>
<li>* */</li>
</ul>
<p>		public static function objectToArrayCollection(obj : Object) : ArrayCollection {<br />
            var ac : ArrayCollection =  new ArrayCollection(obj as Array);<br />
            return ac;<br />
		} </p>
<p>		/**</p>
<ul>
<li>@public</li>
<li>@param &#8211; [ArrayCollection]</li>
<li>@return &#8211; XML</li>
<li>@des &#8211; API will convert any ArrayCollection object to XML and returns same</li>
<li>* */</li>
</ul>
<p>		public static function arrayCollectionToXML(ac : ArrayCollection) : XML{<br />
			var xml : XML = objectToXML(ac);<br />
			return xml;<br />
		}</p>
<p>		/**</p>
<ul>
<li>@public</li>
<li>@param &#8211; [String]</li>
<li>@return &#8211; [String]</li>
<li>@des &#8211; remove all white space for a string and returns same</li>
<li>* */</li>
</ul>
<p>		public static function trimWhiteSpace(str : String) : String {<br />
			var pattern:RegExp = /[\s]+/g;<br />
			return str.replace(pattern, &#8220;&#8221;);<br />
		}<br />
		/**</p>
<ul>
<li>@public</li>
<li>@param &#8211; [String]</li>
<li>@return &#8211; [String]</li>
<li>@des &#8211; remove all \n for a string and returns same</li>
<li>* */</li>
</ul>
<p>		public static function trimNewLines(str : String) : String {<br />
			var pattern:RegExp = /[\r\n]/g;<br />
			return str.replace(pattern, &#8220;&#8221;);<br />
		}</p>
<p>		/**</p>
<ul>
<li>@public</li>
<li>@param &#8211; [String]</li>
<li>@return &#8211; [Boolean]</li>
<li>@des &#8211; API returns true if string contains alpha numeric value else false</li>
<li>*/</li>
</ul>
<p>		public function containsAlphaNumeric(str:String) : Boolean {<br />
			var pattern:RegExp = /[^a-zA-Z0-9]/;<br />
			return str.search(pattern) != 0;<br />
		}<br />
	}<br />
} </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/skr4u.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/skr4u.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/skr4u.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/skr4u.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/skr4u.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/skr4u.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/skr4u.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/skr4u.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/skr4u.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/skr4u.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/skr4u.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/skr4u.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/skr4u.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/skr4u.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=skr4u.wordpress.com&amp;blog=7124168&amp;post=53&amp;subd=skr4u&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://skr4u.wordpress.com/2009/04/01/flex-utility-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad953cc3c0c82e298aabbfdd95cca3fd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">skr4u</media:title>
		</media:content>
	</item>
	</channel>
</rss>
