<?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 on blog &#8211; by kumar</title>
	<atom:link href="https://flexonblog.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://flexonblog.wordpress.com</link>
	<description></description>
	<lastBuildDate>Wed, 23 Jan 2013 05:54:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<site xmlns="com-wordpress:feed-additions:1">2177195</site><cloud domain='flexonblog.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://secure.gravatar.com/blavatar/c086a7902a3c29799014cfa1bb18cded794ba722581b81faee71fbefa0aecd0f?s=96&#038;d=https%3A%2F%2Fs0.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>flex on blog &#8211; by kumar</title>
		<link>https://flexonblog.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://flexonblog.wordpress.com/osd.xml" title="flex on blog - by kumar" />
	<atom:link rel='hub' href='https://flexonblog.wordpress.com/?pushpress=hub'/>
	<item>
		<title>Using StageWebView as background for your app in Flex.</title>
		<link>https://flexonblog.wordpress.com/2013/01/23/using-stagewebview-as-background-for-your-app-in-flex/</link>
					<comments>https://flexonblog.wordpress.com/2013/01/23/using-stagewebview-as-background-for-your-app-in-flex/#respond</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Wed, 23 Jan 2013 05:54:50 +0000</pubDate>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex 4.5]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[BitmapData]]></category>
		<category><![CDATA[StageWebView]]></category>
		<guid isPermaLink="false">http://99thoughts.com/flex_blog/?p=477</guid>

					<description><![CDATA[Basic thing about StageWebView class is that it is used to display html content in your app. To be more clear on that it is &#8216;rendered above all display list content&#8217;. Now having said that you cannot place/put other content like flex controls/components like a Button or List on above it. [wp_ad_camp_1] But what if you [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Basic thing about StageWebView class is that it is used to display html content in your app. To be more clear on that it is &#8216;rendered above all display list content&#8217;. Now having said that you cannot place/put other content like flex controls/components like a Button or List on above it.</p>
<p><span id="more-477"></span></p>
<p>[wp_ad_camp_1]</p>
<p>But what if you have a requirement where you just want to capture the html content rendered using StageWebView and apply it as a background to your app. I would say &#8216;Yes we can do this&#8217;. Because  i have seen the source code of it. Source code is not available within the Flash Builder as it is part of &#8216;flash.media.StageWebView&#8217; package and from airglobal.swc, but you can check out the<a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/StageWebView.html"> online</a> docs. So In that class there&#8217;s a method called &#8216;drawViewPortToBitmapData'(actual signature is given below), so using this we can actually capture a snapshot of the html content rendered using the StageWebView, which gives us the BitmapData and you can apply this BitmapData object as source to your image component in Flex or as a background for your app.</p>
<pre class="brush: as3">drawViewPortToBitmapData(bitmap:BitmapData):void</pre>
<p>Hope this post helps someone.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2013/01/23/using-stagewebview-as-background-for-your-app-in-flex/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">477</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>
	</item>
		<item>
		<title>Packaging a native extension (Example batch file with all the options necessary to make one)</title>
		<link>https://flexonblog.wordpress.com/2013/01/05/packaging-a-native-extension-example-bat-file-with-all-the-options-necessary-to-make-one/</link>
					<comments>https://flexonblog.wordpress.com/2013/01/05/packaging-a-native-extension-example-bat-file-with-all-the-options-necessary-to-make-one/#comments</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Sat, 05 Jan 2013 08:09:03 +0000</pubDate>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[Flex 4.6]]></category>
		<category><![CDATA[native extensions]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[andriod]]></category>
		<category><![CDATA[batch file]]></category>
		<guid isPermaLink="false">http://99thoughts.com/flex_blog/?p=473</guid>

					<description><![CDATA[There has been a lot of questions and confusion on actually writing your batch file to compile/package your ANE file. Well i have decided to create a prototype of the batch file and share it here on my blog. Your .bat file contents are as below. set adt_directory=C:Program FilesAdobeAdobe Flash Builder 4.6sdks4.6.0bin set root_directory=C:Projects set [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>There has been a lot of questions and confusion on actually writing your batch file to compile/package your ANE file. Well i have decided to create a prototype of the batch file and share it here on my blog.</p>
<p>Your .bat file contents are as below.</p>
<p><code>set adt_directory=C:Program FilesAdobeAdobe Flash Builder 4.6sdks4.6.0bin<br />
set root_directory=C:Projects<br />
set library_directory=%root_directory%NativeExtLibrary<br />
set native_directory=%root_directory%NativeExt<br />
set signing_options=-storetype pkcs12 -keystore "C:Projectsp12key.p12" -tsa none<br />
set dest_ANE=%root_directory%nativeExtPackagingANE.ane<br />
set extension_XML=%library_directory%srcextension.xml<br />
set library_SWC=%library_directory%binNativeExtLibrary.swc<br />
set SWF_directory=%library_directory%binNativeExtLibrary<br />
"%adt_directory%"/adt -package %signing_options% -target ane "%dest_ANE%" "%extension_XML%" -swc "%library_SWC%" -platform Android-ARM -C "%SWF_directory%" library.swf -C "%native_directory%" NativeExt.jar</code></p>
<p>Below explaining the variables in your bat file.</p>
<p>root_directory &#8211; root folder of your flex projects.<br />
library_directory &#8211; location of your Native extension wrapper Flex library project.<br />
native_directory &#8211; location of your native extension project(for Android-ARM it will be android project location).<br />
signing_options &#8211; signed certificate for your extension and its options (-tsa none option to discard timestamp).<br />
dest_ANE &#8211; location to create your ane file.<br />
extension_XML &#8211; location of Native extension wrapper Flex library project extension descriptor file.<br />
library_SWC &#8211; location of your Native extension wrapper Flex library project compilation file.<br />
SWF_directory &#8211; location of your library.swf file.<br />
Android-ARM &#8211; packaging ane for Android</p>
<p><span id="more-473"></span></p>
<p>[showmyads]</p>
<p><a href="http://99thoughts.com/Examples/examples2/anePackagin.bat" target="_blank">Download file.</a></p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2013/01/05/packaging-a-native-extension-example-bat-file-with-all-the-options-necessary-to-make-one/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">473</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>
	</item>
		<item>
		<title>Interaction Mode in Flex</title>
		<link>https://flexonblog.wordpress.com/2012/12/28/interaction-mode-in-flex/</link>
					<comments>https://flexonblog.wordpress.com/2012/12/28/interaction-mode-in-flex/#comments</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Fri, 28 Dec 2012 06:08:00 +0000</pubDate>
				<category><![CDATA[Flex 4.5]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[interactionMode]]></category>
		<category><![CDATA[Touch]]></category>
		<guid isPermaLink="false">http://99thoughts.com/flex_blog/?p=448</guid>

					<description><![CDATA[Interaction mode defines how you allow your app to interact with an app user. Interaction mode is again based on Theme you choose for your app, namely Halo, Spark, Modile. Default Interaction mode for Halo, Spark is mouse and for Mobile its touch. But what if you want a different interaction mode rather than the [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Interaction mode defines how you allow your app to interact with an app user. Interaction mode is again based on Theme you choose for your app, namely Halo, Spark, Modile. Default Interaction mode for Halo, Spark is mouse and for Mobile its touch.</p>
<p>But what if you want a different interaction mode rather than the default one, well its simple to change by using &#8216;interactionMode&#8217; property and its usage is given below.</p>
<p><span id="more-448"></span></p>
<p>[showmyads]</p>
<p>MXML</p>
<pre class="brush: as3">interactionMode="touch"

//Other value 'mouse'</pre>
<p>In ActionScript you can change at runtime using the setStyle function since its a style property like below.</p>
<pre class="brush: as3">setStyle( "interactionMode", InteractionMode.TOUCH );

//Other value 'InteractionMode.MOUSE'</pre>
<p>Happy new year.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2012/12/28/interaction-mode-in-flex/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">448</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>
	</item>
		<item>
		<title>Load schema and access the loaded schema of database in SQLite, AIR.</title>
		<link>https://flexonblog.wordpress.com/2012/12/21/load-schema-and-access-the-loaded-schema-of-database-in-sqlite-air/</link>
					<comments>https://flexonblog.wordpress.com/2012/12/21/load-schema-and-access-the-loaded-schema-of-database-in-sqlite-air/#comments</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Fri, 21 Dec 2012 10:21:43 +0000</pubDate>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://99thoughts.com/flex_blog/?p=424</guid>

					<description><![CDATA[As always lets do things in steps. Create necessary variables. Open connection to database file already created. Read schema from opened connection to database. 1. Create necessary variables private var sqlConnection:SQLConnection; private var dbFile:File; private var sqlStatement:SQLStatement; 2. Open connection to database file already created dbFile=new File(); dbFile=File.applicationStorageDirectory.resolvePath("myDatabase.db"); sqlConnection = new SQLConnection(); sqlConnection.addEventListener(SQLEvent.OPEN, onDBOpened); sqlConnection.addEventListener(SQLErrorEvent.ERROR, onDBError); [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>As always lets do things in steps.</p>
<ol>
<li>Create necessary variables.</li>
<li>Open connection to database file already created.</li>
<li>Read schema from opened connection to database.</li>
</ol>
<p><strong>1. Create necessary variables</strong></p>
<pre class="brush: as3">private var sqlConnection:SQLConnection;
private var dbFile:File;
private var sqlStatement:SQLStatement;</pre>
<p><strong>2. Open connection to database file already created</strong></p>
<pre class="brush: as3">dbFile=new File();
dbFile=File.applicationStorageDirectory.resolvePath("myDatabase.db");

sqlConnection = new SQLConnection();
sqlConnection.addEventListener(SQLEvent.OPEN, onDBOpened);
sqlConnection.addEventListener(SQLErrorEvent.ERROR, onDBError);
sqlConnection.open(dbFile);</pre>
<p><strong>3. Read schema from opened connection to database</strong><br />
<span id="more-424"></span></p>
<p>[showmyads]</p>
<pre class="brush: as3">//event handler for SQLEvent.OPEN

private function onDBOpened(event:SQLEvent):void
{
 if (event.type == "open")
 {
  //successfully opened database connection

  //below statement loads schema
  sqlConnection.loadSchema();
  //below statement to access the schema
  var sqlSchemaResult:SQLSchemaResult=sqlConnection.getSchemaResult();
  //below statement returns all tables from loaded schema result that is array of SQLTableSchema
  var tables:Array=sqlSchemaResult.tables;			
  for each(var sqlTableSchema:SQLTableSchema in tables)
  {
   trace("Table name:"+sqlTableSchema.name);
   trace("Columns:"+sqlTableSchema.columns);
   //can explore SQLTableSchema Class for more.
  }
 }
}</pre>
<p>Hi People, Its been a while i blogged, trying to make it back and hope this post helps someone.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2012/12/21/load-schema-and-access-the-loaded-schema-of-database-in-sqlite-air/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">424</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>
	</item>
		<item>
		<title></title>
		<link>https://flexonblog.wordpress.com/2012/12/13/580/</link>
					<comments>https://flexonblog.wordpress.com/2012/12/13/580/#respond</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Thu, 13 Dec 2012 11:49:09 +0000</pubDate>
				<category><![CDATA[Flex related]]></category>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/?p=580</guid>

					<description><![CDATA[Hi All, I have moved my blog from www.flexonblog.wordpress.com to www.99thoughts.com/flex_blog. Sorry for any inconvenience, please update your links and such. Hope to look forward to your support.]]></description>
										<content:encoded><![CDATA[<p>Hi All,</p>
<p>I have moved my blog from<a href="https://flexonblog.wordpress.com/" target="_blank"> www.flexonblog.wordpress.com</a> to <a href="http://99thoughts.com/flex_blog" target="_blank">www.99thoughts.com/flex_blog</a>.</p>
<p>Sorry for any inconvenience, please update your links and such.</p>
<p>Hope to look forward to your support.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2012/12/13/580/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">580</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>
	</item>
		<item>
		<title>Tips on Spark List control and Spark DataGrid control</title>
		<link>https://flexonblog.wordpress.com/2011/05/30/tips-on-spark-list-control-and-spark-datagrid-control/</link>
					<comments>https://flexonblog.wordpress.com/2011/05/30/tips-on-spark-list-control-and-spark-datagrid-control/#respond</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Mon, 30 May 2011 08:36:03 +0000</pubDate>
				<category><![CDATA[Flex4]]></category>
		<category><![CDATA[Tips]]></category>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/?p=409</guid>

					<description><![CDATA[In Halo DataGrid control and Halo List control you would use the property scrollToIndex(index:int)  to specify to make the item at that index visible.But in Spark List control and Spark DataGrid control you should use different properties like below. For Spark List ensureIndexIsVisible(index:int); For Spark DataGrid (version 4.5) ensureCellIsVisible(index:int);  and then there&#8217;s also setSelectedIndex(index:int); for Spark [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In Halo DataGrid control and Halo List control you would use the property <em>scrollToIndex(index:int)</em>  to specify to make the item at that index visible.But in Spark List control and Spark DataGrid control you should use different properties like below.</p>
<p>For Spark List</p>
<p><em>ensureIndexIsVisible(index:int);</em></p>
<p>For Spark DataGrid (version 4.5)</p>
<p><em>ensureCellIsVisible(index:int); </em></p>
<p>and then there&#8217;s also <em>setSelectedIndex(index:int);</em> for Spark DataGrid</p>
<p>Enjoy the tip.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2011/05/30/tips-on-spark-list-control-and-spark-datagrid-control/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">409</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>
	</item>
		<item>
		<title>Image Cropping in Flex</title>
		<link>https://flexonblog.wordpress.com/2011/01/31/image-cropping-in-flex/</link>
					<comments>https://flexonblog.wordpress.com/2011/01/31/image-cropping-in-flex/#comments</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Mon, 31 Jan 2011 11:59:25 +0000</pubDate>
				<category><![CDATA[code downloads]]></category>
		<category><![CDATA[downloads]]></category>
		<category><![CDATA[Flex related]]></category>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/?p=397</guid>

					<description><![CDATA[Even though there are many posts on this particular topic still there are many ???, then i thought may be i can write about it, so lets get started. Lets do things in steps. Load Image in to Flex App Convert it to Bitmap and BitmapData objects. Crop Image using BitmapData object 1.Load Image in [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Even though there are many posts on this particular topic still there are many ???, then i thought may be i can write about it, so lets get started.</p>
<p>Lets do things in steps.</p>
<ol>
<li>Load Image in to Flex App</li>
<li>Convert it to Bitmap and BitmapData objects.</li>
<li>Crop Image using BitmapData object</li>
</ol>
<p><strong>1.Load Image in to Flex App</strong></p>
<p><em>private var imageLoader:Loader = new Loader();</em></p>
<p><em>private function fnInit():void</em><br />
<em> {</em><br />
<em> imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadImageComplete);</em><br />
<em> imageLoader.load(new URLRequest(&#8220;assets/flower.png&#8221;));</em><br />
<em> }</em></p>
<p><strong>2.Convert it to Bitmap and BitmapData objects</strong></p>
<p><em>private var bitmapImage:Bitmap;</em><br />
<em> private var bitmapDataImage:BitmapData;</em></p>
<p><em>//Event.COMPLETE eventHandler for Loader</em></p>
<p><em>private function loadImageComplete(e:Event):void</em><br />
<em> {</em><br />
<em> bitmapImage = Bitmap(e.target.loader.content);</em><br />
<em> bitmapDataImage = Bitmap(bitmapImage).bitmapData.clone();</em><br />
<em> }</em></p>
<p><strong>3.Crop Image using BitmapData object</strong><br />
<span id="more-397"></span></p>
<p>[showmyads]</p>
<p><em>//Specifying the dimensions for Image cropping</em></p>
<p><em>private var WIDTH:Number=200;</em><br />
<em> private var HEIGHT:Number=150;</em><br />
<em> private var X:Number=50;</em><br />
<em> private var Y:Number=50;</em></p>
<p><em>private function getCroppedImage():BitmapData</em><br />
<em> {</em><br />
<em> var croppedBitmapData:BitmapData = new BitmapData(WIDTH, HEIGHT, false);</em><br />
<em> croppedBitmapData.copyPixels(bitmapDataImage, getImageRect(), new Point(0, 0));</em><br />
<em> return croppedBitmapData;</em><br />
<em> }</em></p>
<p><em>private function getImageRect():Rectangle</em><br />
<em> {</em><br />
<em> var requestedRect:Rectangle;</em><br />
<em> requestedRect = new Rectangle(X, Y, WIDTH, HEIGHT);</em><br />
<em> return requestedRect;</em><br />
<em> }</em></p>
<p>here the function getCroppedImage() returns the cropped Image BitmapData.And to see the cropped Image assign it to source of Image like below.</p>
<p><em>var croppedBitmap:Bitmap = new Bitmap(getCroppedImage());</em><br />
<em> image.source=croppedBitmap;//image is &#8216;id&#8217; of Image</em></p>
<p>To better understand the Post i recommend reading Bitmap and BitmapData classes.</p>
<p><a href="http://99thoughts.com/Examples/examples2/ImageCropping.swf" target="_blank">View Demo</a></p>
<p><a href="http://99thoughts.com/Examples/examples2/ImageCropping.zip">Download Code</a></p>
<p>Enjoy the Post.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2011/01/31/image-cropping-in-flex/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">397</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>
	</item>
		<item>
		<title>Tip on LinkBar control in Flex</title>
		<link>https://flexonblog.wordpress.com/2010/12/20/tip-on-linkbar-control-in-flex/</link>
					<comments>https://flexonblog.wordpress.com/2010/12/20/tip-on-linkbar-control-in-flex/#comments</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Mon, 20 Dec 2010 11:26:06 +0000</pubDate>
				<category><![CDATA[code downloads]]></category>
		<category><![CDATA[Flex related]]></category>
		<category><![CDATA[samples]]></category>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/?p=394</guid>

					<description><![CDATA[LinkBar control defines the style name &#8220;linkButtonStyleName&#8221; to specify styles for link buttons, but does not define a style name for a selected link button.For example if you want to apply a specific style for a selected link button in the row of link buttons, you would think for a while, make some try outs, [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>LinkBar control defines the style name &#8220;linkButtonStyleName&#8221; to specify styles for link buttons, but does not define a style name for a selected link button.For example if you want to apply a specific style for a selected link button in the row of link buttons, you would think for a while, make some try outs, look in to the code, scratch your head for a while,curse flex and may be finnally give up.The real thing is it isn&#8217;t defined.But there is a way.</p>
<p>LinkBar control defines a row of LinkButtons, meaning we can access and apply styles to any of these individual Buttons at run time using setStyle method.</p>
<p>Example: Button(lnkBr.getChildAt(0)).setStyle(&#8220;fontWeight&#8221;,&#8221;normal&#8221;);</p>
<p>In the above line lnkBr is id of the LinkBar and getChildAt method gets that particular button and then we can apply style to that button using the setStyle method.</p>
<p><a href="http://99thoughts.com/Examples/examples2/LinkBarEx1.swf">Demo</a></p>
<p><a href="http://99thoughts.com/Examples/examples2/LinkBarEx1.zip">Code</a></p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2010/12/20/tip-on-linkbar-control-in-flex/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">394</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>
	</item>
		<item>
		<title>Display ToolTips for Combobox List items in Flex4</title>
		<link>https://flexonblog.wordpress.com/2010/07/13/display-tooltips-for-combobox-list-items-in-flex4/</link>
					<comments>https://flexonblog.wordpress.com/2010/07/13/display-tooltips-for-combobox-list-items-in-flex4/#comments</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Tue, 13 Jul 2010 06:32:21 +0000</pubDate>
				<category><![CDATA[code downloads]]></category>
		<category><![CDATA[corrections]]></category>
		<category><![CDATA[Flex related]]></category>
		<category><![CDATA[Flex4]]></category>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/?p=389</guid>

					<description><![CDATA[Few months back i made this post in Flex3, it was buggy and i figured later it may not be possible here with my logic.Then comes the Flex4, did anyone tell you Flex4 is awesome, yes it is.The same requirement where you want to show tooltips on comboBox List items on roolover can be achieved easily in Flex4.You may [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Few months back i made <a href="https://flexonblog.wordpress.com/2009/03/04/display-tooltips-for-combobox-list-items-in-flex/" target="_blank">this </a>post in <strong>Flex3</strong>, it was buggy and i figured later it may not be possible here with my logic.Then comes the <strong>Flex4</strong>, did anyone tell you Flex4 is awesome, yes it is.The same requirement where you want to show tooltips on comboBox List items on roolover can be achieved easily in Flex4.You may have to read about the new ItemRenderer Class and its architecture for better understanding the code and you can go figure your own requirement then.</p>
<p>Download code below.</p>
<p><span id="more-389"></span></p>
<p>[showmyads]</p>
<p><a href="http://99thoughts.com/Examples/examples2/Fx4_1.zip" target="_blank">Download code</a></p>
<p>And this is my first post on Flex4.Enjoy the post.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2010/07/13/display-tooltips-for-combobox-list-items-in-flex4/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">389</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>
	</item>
		<item>
		<title>Flash,Steve Jobs,Adobe: what do you think?.</title>
		<link>https://flexonblog.wordpress.com/2010/04/30/flashsteve-jobsadobe-what-do-you-think/</link>
					<comments>https://flexonblog.wordpress.com/2010/04/30/flashsteve-jobsadobe-what-do-you-think/#comments</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Fri, 30 Apr 2010 08:55:54 +0000</pubDate>
				<category><![CDATA[discussions]]></category>
		<category><![CDATA[Flex related]]></category>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/?p=385</guid>

					<description><![CDATA[If you haven&#8217;t read it, please do so. So after reading the longggggggg page, i just thought a few too. 1.Did he just pull a fast one?. 2.Why is he directly blaming Flash(Adobe)?, I smell something fishy. 3.What does the Microsoft think about this?,  The enemy of my enemy is my friend. 4.I find only two [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you haven&#8217;t read it, please <a href="http://www.apple.com/hotnews/thoughts-on-flash/" target="_blank">do so</a>.</p>
<p>So after reading the longggggggg page, i just thought a few too.</p>
<p>1.Did he just pull a fast one?.<br />
2.Why is he directly blaming Flash(Adobe)?, I smell something fishy.<br />
3.What does the Microsoft think about this?,  The enemy of my enemy is my friend.<br />
4.I find only two thoughts reasonable,<br />
<em> -Third, there’s reliability, security and performance.<br />
</em> <em>-Fourth, there’s battery life.<br />
</em>5.Repetitive thought, we follow all open standards [HTML5, CSS and JavaScript &#8230;], yeah like they create them and we should follow them.:-)<br />
6.How come Flash works on Android phones?.May be Apple needs to enhance their products.<br />
7.What&#8217;s Adobe reaction?.<br />
8.There&#8217;s always thrist for new experiances, can&#8217;t stick to one standard/technology for a long time, and especially in this era whether PC or mobile.<br />
9.Why did we adopt to Flash for web and Why is that difficult for mobile.Its been 40 years since man set foot on moon, did they make it or fake it.<br />
10.It really doesn&#8217;t matter for the end user/customer who owns what, what really matters is that who can satisfy him/her.<br />
11. And there&#8217;s a lot more &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..</p>
<p>i am really tired of this shit, so if you people have any thoughts on this just comment.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2010/04/30/flashsteve-jobsadobe-what-do-you-think/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">385</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>
	</item>
		<item>
		<title>Tip on Panel Class in Flex</title>
		<link>https://flexonblog.wordpress.com/2009/12/16/tip-on-panel-class-in-flex/</link>
					<comments>https://flexonblog.wordpress.com/2009/12/16/tip-on-panel-class-in-flex/#comments</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Wed, 16 Dec 2009 07:36:23 +0000</pubDate>
				<category><![CDATA[Flex related]]></category>
		<category><![CDATA[Tips]]></category>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/?p=375</guid>

					<description><![CDATA[Often hear questions on Alert Control like, remove default Button(OK),add new Button&#8217;s and so on.., and on TitleWindow like, re-arrange close Button to top-left,add new Buttons and so on.. One thing we got to notice at first is that TitleWindow and Alert are Classes which are derived from Panel Class, which in turn is derived [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Often hear questions on Alert Control like, remove default Button(OK),add new Button&#8217;s and so on.., and on TitleWindow like, re-arrange close Button to top-left,add new Buttons and so on..</p>
<p>One thing we got to notice at first is that TitleWindow and Alert are Classes which are derived from Panel Class, which in turn is derived from Container Class, so Alert and TitleWindow are sub-classes of Panel Class, they are created by addding new functionality[methods and properties] to the Panel Class.And the final tip is that, look in to the code,look in to the Class Diagram and if you dont have one then download it <a href="https://flexonblog.wordpress.com/2008/02/11/download-class-diagram-and-framework-diagram-of-flex-at-my-blog/" target="_blank">here </a>, make a print and stick to a wall near you.</p>
<p>So, having said that you need to decide an appropriate implementation based of your requirements.Example, if you dont want to show OK(default Button) Button on the Alert Control,then better not to use Alert Control, go for a Panel,which is appropriate.</p>
<p>Below fig shows the Relational Diagram of Container,Panel,Alert and TitleWindow Classes.</p>
<p><a href="http://99thoughts.com/flex_blog/wp-content/uploads/2009/12/paneltip1.png"><img data-attachment-id="377" data-permalink="https://flexonblog.wordpress.com/paneltip-2/" data-orig-file="https://flexonblog.wordpress.com/wp-content/uploads/2009/12/paneltip1.png" data-orig-size="391,339" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="paneltip1" data-image-description="&lt;p&gt;Relational Diagram of Panel,Alert,TitleWindow&lt;/p&gt;
" data-image-caption="" data-medium-file="https://flexonblog.wordpress.com/wp-content/uploads/2009/12/paneltip1.png?w=300" data-large-file="https://flexonblog.wordpress.com/wp-content/uploads/2009/12/paneltip1.png?w=391" class="aligncenter size-full wp-image-377" src="https://i0.wp.com/99thoughts.com/flex_blog/wp-content/uploads/2009/12/paneltip1.png" alt="Relational Diagram of Panel,Alert,TitleWindow" width="391" height="339" srcset="https://i0.wp.com/99thoughts.com/flex_blog/wp-content/uploads/2009/12/paneltip1.png 391w, https://i0.wp.com/99thoughts.com/flex_blog/wp-content/uploads/2009/12/paneltip1.png?w=150&amp;h=130 150w, https://i0.wp.com/99thoughts.com/flex_blog/wp-content/uploads/2009/12/paneltip1.png?w=300&amp;h=260 300w" sizes="(max-width: 391px) 100vw, 391px" /></a></p>
<p>Enjoy the Post.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2009/12/16/tip-on-panel-class-in-flex/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">375</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>

		<media:content url="http://99thoughts.com/flex_blog/wp-content/uploads/2009/12/paneltip1.png" medium="image">
			<media:title type="html">Relational Diagram of Panel,Alert,TitleWindow</media:title>
		</media:content>
	</item>
		<item>
		<title>Sorting Date&#8217;s on ArrayCollection in Flex</title>
		<link>https://flexonblog.wordpress.com/2009/11/16/sorting-dates-on-arraycollection-in-flex/</link>
					<comments>https://flexonblog.wordpress.com/2009/11/16/sorting-dates-on-arraycollection-in-flex/#comments</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Mon, 16 Nov 2009 04:26:42 +0000</pubDate>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[Flex related]]></category>
		<category><![CDATA[samples]]></category>
		<category><![CDATA[ArrayCollection Date Field]]></category>
		<category><![CDATA[compare Function]]></category>
		<category><![CDATA[Sort]]></category>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/?p=363</guid>

					<description><![CDATA[First things first, read about the mx.collections.Sort Class before going in to the code below. About the Post,suppose i have a AC[ArrayCollection] like below; [Bindable] private var arrClldetails:ArrayCollection = new ArrayCollection([ {Fname:&#8221;Kranthi&#8221;, Lname:&#8221;Kata&#8221;, dob:&#8221;21 Sep 79&#8243;}, {Fname:&#8221;Vasanth&#8221;, Lname:&#8221;Lola&#8221;, dob:&#8221;11 Jun 80&#8243;}, {Fname:&#8221;Manoj&#8221;, Lname:&#8221;Pati&#8221;, dob:&#8221;16 July 81&#8243;}, {Fname:&#8221;John McClain&#8221;, Lname:&#8221;Mela&#8221;, dob:&#8221;15 Feb 72&#8243;}, {Fname:&#8221;Ross&#8221;, Lname:&#8221;Geller&#8221;, dob:&#8221;02 [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>First things first, read about the <strong>mx.collections.Sort</strong> Class before going in to the code below.</p>
<p>About the Post,suppose i have a AC[<strong>ArrayCollection</strong>] like below;</p>
<p><em>[Bindable]<br />
private var arrClldetails:ArrayCollection = new ArrayCollection([<br />
{Fname:&#8221;Kranthi&#8221;, Lname:&#8221;Kata&#8221;, dob:&#8221;21 Sep 79&#8243;},<br />
{Fname:&#8221;Vasanth&#8221;, Lname:&#8221;Lola&#8221;, dob:&#8221;11 Jun 80&#8243;},<br />
{Fname:&#8221;Manoj&#8221;, Lname:&#8221;Pati&#8221;, dob:&#8221;16 July 81&#8243;},<br />
{Fname:&#8221;John McClain&#8221;, Lname:&#8221;Mela&#8221;, dob:&#8221;15 Feb 72&#8243;},<br />
{Fname:&#8221;Ross&#8221;, Lname:&#8221;Geller&#8221;, dob:&#8221;02 Jan 74&#8243;},<br />
{Fname:&#8221;Chandler&#8221;, Lname:&#8221;Bing&#8221;, dob:&#8221;18 Oct 76&#8243;}<br />
]);</em></p>
<p>Now i want to Sort the &#8220;dob&#8221; Date field in the AC.,so for this i need to<br />
write a compareFunction for Sort which in turn is applied to the AC like below,</p>
<p><span id="more-363"></span></p>
<p>[showmyads]</p>
<p><em>//Compare Function<br />
private function fnCompareFunction(ObjA:Object,ObjB:Object,fields:Array = null):int<br />
{<br />
//fnDtfParceFunct is a Date parse function avail in DownloadCode.<br />
var dateA:Date=fnDtfParceFunct(ObjA.dob,&#8221;DD/MM/YY&#8221;);<br />
var dateB:Date=fnDtfParceFunct(ObjB.dob,&#8221;DD/MM/YY&#8221;);<br />
return ObjectUtil.dateCompare(dateA, dateB);<br />
}</em></p>
<p>Now apply this CompareFunction to Sort and then apply that to AC like below,</p>
<p><em>var sort:Sort=new Sort();<br />
sort.compareFunction=fnCompareFunction;<br />
arrClldetails.sort=sort;</em></p>
<p>Now refresh the AC for Sort to take effect,</p>
<p><em>arrClldetails.refresh();</em></p>
<p><a href="http://99thoughts.com/Examples/examples2/SortDateAC.swf" target="_blank">Run Demo</a></p>
<p><a href="http://99thoughts.com/Examples/examples2/SortDateAC.zip" target="_blank">Download Code</a></p>
<p>Enjoy the post.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2009/11/16/sorting-dates-on-arraycollection-in-flex/feed/</wfw:commentRss>
			<slash:comments>13</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">363</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>
	</item>
		<item>
		<title>Tracing Childrens of a Container in Flex</title>
		<link>https://flexonblog.wordpress.com/2009/11/09/tracing-childrens-of-a-container-in-flex/</link>
					<comments>https://flexonblog.wordpress.com/2009/11/09/tracing-childrens-of-a-container-in-flex/#respond</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Mon, 09 Nov 2009 09:14:20 +0000</pubDate>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[Flex related]]></category>
		<category><![CDATA[container]]></category>
		<category><![CDATA[flex]]></category>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/?p=358</guid>

					<description><![CDATA[A Container in Flex is one that controls the layout characteristics of child components and which extends the Container base Class like the famous Panel,Canvas,ViewStack,TabNavigator,&#8230; Container contains childrens or Sub Components or Sub Containers[Container in a Container], and so on.Childrens/child components in a Container are all are created using the creationPolicy setting of that Container.In [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>A Container in Flex is one that controls the layout characteristics of child components and which extends the Container base Class like the famous Panel,Canvas,ViewStack,TabNavigator,&#8230;</p>
<p>Container contains childrens or Sub Components or Sub Containers[Container in a Container], and so on.Childrens/child components in a Container are all are created using the creationPolicy setting of that Container.In case of sub containers, outer Containers are created before the inner one&#8217;s.And creation can be altered by setting the creationPolicy.</p>
<p>So now we know some basics of Container its time for the Topic.</p>
<p><strong>Tracing..<br />
</strong>We can manage the child components of a Container by using its predefined methods,like below..<br />
<strong>1.</strong>Container.getChildren() &#8211; returns an Array of child components.<br />
<em>var arr:Array=Container.getChildren();</em><br />
<strong>2.</strong>Container.getChildAt(index:int) &#8211; returns an instance of the DisplayObject at that creation index,which we can cast to required.<br />
<em>var obj:Object=Container.getChildAt(0);</em><br />
<strong>3.</strong>Container.removeChildAt(index:int) &#8211; removes child at that creation index<br />
<em>var disObj:DisplayObject=Container.removeChildAt(0);</em><br />
<strong>4.</strong>Container.removeAllChildren() &#8211; as the name specifies<br />
&#8230;.so on</p>
<p>In the below download code i have implemented all these methods with a Panel.Enjoy the Post.</p>
<p><a href="http://99thoughts.com/Examples/examples1/TracingContainer.zip" target="_blank">Download code.</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2009/11/09/tracing-childrens-of-a-container-in-flex/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">358</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>
	</item>
		<item>
		<title>Assign a menu item(on right click menu list) to DataGrid control in Flex.</title>
		<link>https://flexonblog.wordpress.com/2009/10/09/assign-a-menu-itemon-right-click-menu-list-to-datagrid-control-in-flex/</link>
					<comments>https://flexonblog.wordpress.com/2009/10/09/assign-a-menu-itemon-right-click-menu-list-to-datagrid-control-in-flex/#comments</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Fri, 09 Oct 2009 09:57:19 +0000</pubDate>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[Flex related]]></category>
		<category><![CDATA[samples]]></category>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/?p=354</guid>

					<description><![CDATA[OK, First thing to do, read about flash.ui.ContextMenu Class. Some points.. -&#62;In SWF content, any object that inherits from InteractiveObject can be given a context menu by assigning a menu object to its contextMenu property. -&#62;In Flex, only top-level components in the application can have context menus. -&#62;Flash Player has three types of context menus:standard [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>OK, First thing to do, read about <em>flash.ui.ContextMenu</em> Class.<br />
Some points..<br />
-&gt;In SWF content, any object that inherits from InteractiveObject can be given a context menu by assigning a menu object to its contextMenu property.<br />
-&gt;In Flex, only top-level components in the application can have context menus.<br />
-&gt;Flash Player has three types of context menus:standard menu ,the edit menu and an error menu.Only the standard and edit menus can be modified with the ContextMenu class.<br />
&#8230;<br />
so first create a ContextMenu for the DataGrid like below..</p>
<p><em>private function fnDgContextMenu():ContextMenu<br />
{<br />
var newContextMenu:ContextMenu = new ContextMenu();<br />
var newContextMenuItem:ContextMenuItem=new ContextMenuItem(&#8220;Sort&#8221;);<br />
newContextMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,fnSortSelect);<br />
newContextMenu.customItems.push(newContextMenuItem);<br />
return newContextMenu;<br />
}</em></p>
<p>now assign it to DataGrid.<br />
<em>dg.contextMenu=fnDgContextMenu(); // here dg is the &#8220;id&#8221; of the DataGrid.check the code below.</em></p>
<p>[showmyads]</p>
<p><a href="http://99thoughts.com/Examples/examples1/DgContextMenu1.zip" target="_blank">Download code.</a></p>
<p>Enjoy the post.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2009/10/09/assign-a-menu-itemon-right-click-menu-list-to-datagrid-control-in-flex/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">354</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>
	</item>
		<item>
		<title>Tips on MenuBar control and its dataProvider in flex</title>
		<link>https://flexonblog.wordpress.com/2009/09/25/tips-on-menubar-control-and-its-dataprovider-in-flex/</link>
					<comments>https://flexonblog.wordpress.com/2009/09/25/tips-on-menubar-control-and-its-dataprovider-in-flex/#comments</comments>
		
		<dc:creator><![CDATA[Kumar Gandhi]]></dc:creator>
		<pubDate>Fri, 25 Sep 2009 05:28:53 +0000</pubDate>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[Flex related]]></category>
		<category><![CDATA[samples]]></category>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/?p=348</guid>

					<description><![CDATA[Suppose we have a MenuBar and its dataPovider as below. &#60;mx:MenuBar id=&#8221;myMenu&#8221; dataProvider=&#8221;{xmlLst}&#8221; labelField=&#8221;@label&#8221; itemClick=&#8221;fnItemClick(event)&#8221; /&#62; &#60;mx:XMLList id=&#8221;xmlLst&#8221;&#62;         &#60;root label=&#8221;year&#8221;&#62;             &#60;menuitem label=&#8221;2001&#8243; enabled=&#8221;true&#8221;/&#62;             &#60;menuitem label=&#8221;2002&#8243; enabled=&#8221;false&#8221;/&#62;             &#60;menuitem label=&#8221;2003&#8243; enabled=&#8221;true&#8221;/&#62;             &#60;menuitem label=&#8221;2004&#8243; enabled=&#8221;false&#8221;/&#62;             &#60;menuitem label=&#8221;2005&#8243; enabled=&#8221;true&#8221;/&#62;         &#60;/root&#62; &#60;/mx:XMLList&#62; and the itemClick handler below private function fnItemClick(event:MenuEvent):void { //code goes [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Suppose we have a MenuBar and its dataPovider as below.</p>
<p><em>&lt;mx:MenuBar id=&#8221;myMenu&#8221; dataProvider=&#8221;{xmlLst}&#8221; labelField=&#8221;@label&#8221; itemClick=&#8221;fnItemClick(event)&#8221; /&gt;</em></p>
<p><em>&lt;mx:XMLList id=&#8221;xmlLst&#8221;&gt;<br />
        &lt;root label=&#8221;year&#8221;&gt;<br />
            &lt;menuitem label=&#8221;2001&#8243; enabled=&#8221;true&#8221;/&gt;<br />
            &lt;menuitem label=&#8221;2002&#8243; enabled=&#8221;false&#8221;/&gt;<br />
            &lt;menuitem label=&#8221;2003&#8243; enabled=&#8221;true&#8221;/&gt;<br />
            &lt;menuitem label=&#8221;2004&#8243; enabled=&#8221;false&#8221;/&gt;<br />
            &lt;menuitem label=&#8221;2005&#8243; enabled=&#8221;true&#8221;/&gt;<br />
        &lt;/root&gt;<br />
&lt;/mx:XMLList&gt;</em></p>
<p>and the itemClick handler below<br />
<em>private function fnItemClick(event:MenuEvent):void<br />
{<br />
//code goes here on itemClick<br />
}<br />
</em>Desc: The MenuBar displays the XMLList dataProvider with all the years as menuitems[because labelField=&#8221;@label&#8221;], and has a handler for itemClick &#8220;fnItemClick&#8221;.</p>
<p>Now the tips..</p>
<p><strong>1.</strong>To set enabled=true for the year 2002.<br />
<em>xmlLst.menuitem.(@label==&#8221;2002&#8243;).@enabled=true;<br />
</em>//this is like traversing the XMLList.<br />
//this will reflect changes both to XMLList and MenuBar<br />
<strong>2.</strong>To set for all enabled=true.<br />
//here we got to traverse the XMLList and change the data.<br />
<em>for each(var xml:XML in xmlLst.menuitem)<br />
{<br />
 xml.@enabled=true; <br />
}<br />
</em><strong>3.</strong>To set enabled=false for selected Item.<br />
//in the itemClick handler use the below code<br />
<em>event.item.@enabled=false;</em></p>
<p><span style="text-decoration:underline;">Things to remember:-</span> while accessing attributes of XML we got to use &#8216;@&#8217; before the attribute name, not neccessary if it is an Object.</p>
<p><a href="http://99thoughts.com/Examples/examples1/MenuBar_DP.zip" target="_blank">Download code.</a></p>
<p><strong><span style="text-decoration:underline;"><span style="color:#ff0000;">Note:-</span></span></strong> Examples or code you have seen on this blog so far are related to Flex 3 SDK.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://flexonblog.wordpress.com/2009/09/25/tips-on-menubar-control-and-its-dataprovider-in-flex/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">348</post-id>
		<media:content url="https://1.gravatar.com/avatar/abace1f2a2f01612da6f6ae733106605497dda59a282723d8504fa90d8720faa?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kumar gandhi</media:title>
		</media:content>
	</item>
	</channel>
</rss>
