BTA Flexing

My passion RIAs…………..Shardul Singh Bartwal

Archive for the ‘AIR 2.0’ Category

Selected tab skining in Flex 3 Tabbar

Posted by Shardul Singh Bartwal on November 22, 2010

I was trying to skin the tab-bar in flex 3.Was facing some issue,as I dot find any particular property for skinning the selected tab,although there is a property ‘selectedTabTextStyleName’ for the style of the selected text. But ultimately it is done.Below is the code for the skinning of the selected tab of the tab-bar hope you will find it worth of your purpose.Below is the same code. Please feel free to give your idea if you have done this by any other way.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
	 layout="vertical">
<mx:Script>
	<![CDATA[
		import mx.collections.ArrayCollection;
	
	         import mx.controls.tabBarClasses.Tab

		[Bindable]
		private var arrayCollection : ArrayCollection = new ArrayCollection([
		{lbl:'Football'},
		{lbl:'Cricket'},
		{lbl:'BollyBall'}
		])
		
		private function setTabSkin():void
		{
		  var tab:Tab = tabBar.getChildAt(tabBar.selectedIndex) as Tab;			  
		  tab.setStyle("fillColors", ["#0xBBBBBB", "#EEEEEE"]);
                  tab.setStyle("backgroundColor", "#999999");
                  tab.setStyle("borderColor", "#000000");
                  tab.setStyle("themeColor", "#222222");
		}
	]]>
</mx:Script>
	<mx:TabBar id="tabBar" itemClick="setTabSkin()" selectedIndex="0" creationComplete="setTabSkin()" dataProvider="{arrayCollection}" labelField="lbl"/>

</mx:Application>

Advertisements

Posted in AIR 2.0, Flex 3.0 | Leave a Comment »

Getting Ethernet Adapter(MAC Address in AIR Applicaion)

Posted by Shardul Singh Bartwal on October 3, 2010

Its very simple and easy to get the MAC address of any computer with Adobe AIR application.

With just two to three lines you can find it very easily.Just have a look at lines below
and you will get the MAC address of the computer in which your application is running.

var networkInterface : Object =  NetworkInfo.networkInfo.findInterfaces();
var networkInfo  : Object = networkInterface[0];
var physicalAddress : String = networkInfo.hardwareAddress.toString();

Hope you will like it…………

Enjoy Flexing…….

Posted in AIR 2.0 | 7 Comments »