topical media & game development
professional-flex-code-13-MultiRowTabsMain.mx
professional-flex-code-13-MultiRowTabsMain.mx
[swf]
flex
<?xml version="1.0"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:comps="*"
backgroundColor="#FFFFFF" creationComplete="doInit()">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var dp:ArrayCollection;
/*
= [{label:"Tab 1"},
{label:"Tab 2"},
{label:"Tab 3"},
{label:"Tab 4"},
{label:"Tab 5"},
{label:"Tab 6"},
{label:"Tab 7"},
{label:"Tab 8"},
{label:"Tab 9"},];
*/
private function doInit():void{
var temp:ArrayCollection = new ArrayCollection();
temp.addItem({label:"Tab 1"});
temp.addItem({label:"Tab 2"});
temp.addItem({label:"Tab 3"});
temp.addItem({label:"Tab 4"});
temp.addItem({label:"Tab 5"});
temp.addItem({label:"Tab 6"});
temp.addItem({label:"Tab 7"});
this.dp=temp;
}
]]>
</mx:Script>
<mx:Panel width="500" height="300" title="MultiRowTabs">
<comps:professional_flex_code_13_MultiRowTabs width="100%" id="multi" rowHeight="22" myViewStack="{mainView}" dp="{this.dp}" tabsPerRow="4" />
<mx:ViewStack id="mainView" width="100%" height="100%" paddingTop="0" paddingBottom="0">
<mx:Canvas label="Canvas 1" width="100%" height="100%" backgroundColor="#CCCCCC">
<mx:Label text="Canvas 1" />
</mx:Canvas>
<mx:Canvas label="Canvas 2" width="100%" height="100%" backgroundColor="#9999CC" >
<mx:Label text="Canvas 2" />
</mx:Canvas>
<mx:Canvas label="Canvas 3" width="100%" height="100%" backgroundColor="#66FFFF" >
<mx:Label text="Canvas 3" />
</mx:Canvas>
<mx:Canvas label="Canvas 4" width="100%" height="100%" backgroundColor="#66FF66" >
<mx:Label text="Canvas 4" />
</mx:Canvas>
<mx:Canvas label="Canvas 5" width="100%" height="100%" backgroundColor="#CC66CC" >
<mx:Label text="Canvas 5" />
</mx:Canvas>
<mx:Canvas label="Canvas 6" width="100%" height="100%" backgroundColor="#33CCCC" >
<mx:Label text="Canvas 6" />
</mx:Canvas>
<mx:Canvas label="Canvas 7" width="100%" height="100%" backgroundColor="#FFFF99" >
<mx:Label text="Canvas 7" />
</mx:Canvas>
</mx:ViewStack>
</mx:Panel>
</mx:Application>
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.