Search Results

Search found 25 results on 1 pages for 'tabnavigator'.

Page 1/1 | 1 

  • Styling buttons of Flex TabNavigator

    - by donpal
    I created a TabNavigator with a bunch of NavigatorContent inside it, and want to skin just the buttons of the tabs themselves. So I added a skinClass, but looks like in the documentation, there's no skin part to target the button specifically. Do I have to style the mx:TabNavigator itself to accomplish this? I was hoping not since I don't know how to style mx components and am more comfortable with styling spark. Any other alternatives that I didn't think about?

    Read the article

  • Flex 3.5 Accordion and TabNavigator Index Change Bug

    - by majgis
    I'm using Flex 3.5 with Adobe Flex Builder 3. I have found that if you very rapidly click between multiple headers of an accordion component or the tabs of TabNavigator, these components will begin to exhibit odd, unexpected behavior. Has anyone else experienced this behavior and do you know of a patch that can prevent the user from getting in a situation where the tab/header they click on is not the one made visible?

    Read the article

  • Flex 3.5 Accordion and TabNavigator selectedIndex Bug

    - by majgis
    I'm using Flex 3.5 with Adobe Flex Builder 3. I have found that if you very rapidly click between multiple headers of an accordion component or the tabs of TabNavigator, these components will begin to exhibit odd, unexpected behavior. Once this behavior has been evoked, even trying to set the selectedIndex programmatically does not end in the desired result. Specifically, if set the selectedIndex to zero (or click on the first tab/header) it might temporarily hop to that index but then will finish on a different index. Has anyone else experienced this behavior and do you know of a patch that can prevent the user from getting in a situation where the tab/header they click on is not the one made visible?

    Read the article

  • flex tabnavigator skin flicker

    - by Proyb2
    I am try to skin my tabnavigator with PNG, and extend with TabSkin.as and SelectedTabSkin.as, however, when I tried to mouseover, it will caused a flicker into black and load the tab image which I define. What can I do to avoid flicker? TabSkin.as same as SelectedTabSkin.as but different image package { import mx.controls.Image; public class TabSkin extends Image { public function TabSkin():void { super(); } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); } } } Tab.MXML TabNavigator { tabHeight: 39; tab-width: 108; tabOffset: 1; tabStyleName: "tab"; } .tab { fillColors: #000000, #000000; up-skin: ClassReference("TabSkin"); down-skin: ClassReference("TabSkin"); over-skin: ClassReference("TabSkin"); selected-up-skin: ClassReference("SelectedTabSkin"); selected-down-skin: ClassReference("SelectedTabSkin"); selected-over-skin: ClassReference("SelectedTabSkin"); } .selectedTab { font-weight: bold; corner-radius: 0; } <mx:TabNavigator x="223" y="82" width="100%" height="100%" id="tab2"/>

    Read the article

  • Maintain combobox selected item across TabNavigator Tabs

    - by camcim
    Hi guys, I've just recently started out using Flash Builder and have a question surrounding states. In fact I'm not entirely sure it is related to states but read on and I hope it will become clearer. I currently have a custom component that contains 3 comboboxes. This resides in a TabNavigator component. The TabNavigator consits of 5 pages (Tabs). The custom container holding the comboboxes should display the same selected data across all Tabs. ie. If I am in Tab1 and select an item from one of the comboboxes then click on Tab2 I need to mirror the combobox's selection in Tab2. Can anyone offer me suggestions on how to best tackle this? Di I need to set a global variable?

    Read the article

  • Flex 3 - Style not applying completely on dynamically created tabs in TabNavigator

    - by user254177
    When I create a tab dynamically via ActionScript, the style for the newly created (and selected) tab get applied to the skins, but not the text, unless I click on another tab and then click back to it. This is the A/S, MXML and CSS code I am using: private function clickAddTabHandler(event:Event):void{ var vbox:VBox = new VBox; var tab:Canvas = new (Canvas); vbox.label = "Select Location"; vbox.addChild(tab); tabBar.addChild(vbox); tabBar.selectedIndex = tabBar.numChildren-1; } .tabNavigator { disabledSkin: Embed(source="assets/skins/TabBar-tab_disabledSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); downSkin: Embed(source="assets/skins/TabBar-tab_downSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); overSkin: Embed(source="assets/skins/TabBar-tab_overSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); upSkin: Embed(source="assets/skins/TabBar-tab_upSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); selectedDisabledSkin: Embed(source="assets/skins/TabBar-tab_selectedDisabledSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); selectedUpSkin: Embed(source="assets/skins/TabBar-tab_selectedUpSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); selectedOverSkin: Embed(source="assets/skins/TabBar-tab_selectedUpSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); selectedDownSkin: Embed(source="assets/skins/TabBar-tab_selectedUpSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); textAlign: left; paddingLeft: 20; paddingRight: 20; fontSize: 11; fontFamily: Helvetica Neue; color: #FFFFFF; textRollOverColor: #FFFFFF; } .tabNavigatorSelected { textAlign: left; paddingLeft: 20; paddingRight: 20; fontSize: 11; fontFamily: Helvetica Neue; color: #135F9E; textRollOverColor: #135F9E; textSelectedColor: #135F9E; }

    Read the article

  • Flex/Air/AS3 Selecting and Populating a unFocused tab.

    - by Deyon
    I'm having a problem displaying data from a function to text box within a tab. If you run the code and click "Select Tab 2 and Fill..." I get an error; "TypeError: Error #1009: Cannot access a property or method of a null object reference." I'm guessing this is because "Tab 2" is/was not rendered yet. Now if I run the code, select "Tab 2" then select "Tab 1" and click "Select Tab 2 and Fill..." it works the way I would like. Dose any one know a way around this problem. ----Full Flex 4/Flash Builder Code just copy paste---- <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" creationComplete=" "> <fx:Script> <![CDATA[ public function showtab2():void { mytextbox.text="I made it!"; tn.selectedIndex=1; } ]]> </fx:Script> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <mx:Panel title="TabNavigator Container Example" height="90%" width="90%" paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10"> <mx:Label width="100%" color="blue" text="Select the tabs to change the panel."/> <mx:TabNavigator id="tn" width="100%" height="100%"> <!-- Define each panel using a VBox container. --> <mx:VBox label="Panel 1"> <mx:Label text="TabNavigator container panel 1"/> <mx:Button label="Select Tab 2 and Fill with Text" click="showtab2()"/> </mx:VBox> <mx:VBox label="Panel 2"> <mx:Label text="TabNavigator container panel 2"/> <s:TextInput id="mytextbox" /> </mx:VBox> </mx:TabNavigator> <mx:HBox> </mx:HBox> </mx:Panel> </s:WindowedApplication>

    Read the article

  • Selecting and Populating a unFocused tab.

    - by Deyon
    I'm having a problem displaying data from a function to text box within a tab. If you run the code and click "Select Tab 2 and Fill..." I get an error; "TypeError: Error #1009: Cannot access a property or method of a null object reference." I'm guessing this is because "Tab 2" is/was not rendered yet. Now if I run the code, select "Tab 2" then select "Tab 1" and click "Select Tab 2 and Fill..." it works the way I would like. Dose any one know a way around this problem. ----Full Flex 4/Flash Builder Code just copy paste---- <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" creationComplete=" "> <fx:Script> <![CDATA[ public function showtab2():void { mytextbox.text="I made it!"; tn.selectedIndex=1; } ]]> </fx:Script> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <mx:Panel title="TabNavigator Container Example" height="90%" width="90%" paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10"> <mx:Label width="100%" color="blue" text="Select the tabs to change the panel."/> <mx:TabNavigator id="tn" width="100%" height="100%"> <!-- Define each panel using a VBox container. --> <mx:VBox label="Panel 1"> <mx:Label text="TabNavigator container panel 1"/> <mx:Button label="Select Tab 2 and Fill with Text" click="showtab2()"/> </mx:VBox> <mx:VBox label="Panel 2"> <mx:Label text="TabNavigator container panel 2"/> <s:TextInput id="mytextbox" /> </mx:VBox> </mx:TabNavigator> <mx:HBox> </mx:HBox> </mx:Panel> </s:WindowedApplication>

    Read the article

  • Flex 4 hideEffect transition bug

    - by xerious87
    I'm trying to create a slide effect. Everything works fine except when the hideEffect animation is shown for the first time. The content does not become invisible when crossing the TabNavigator's border, which looks really ugly in my current project. The following simple example demonstrates the problem: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" backgroundColor="0xDDDDDD"> <fx:Declarations> <s:Move id="hideEffect" xTo="700" /> </fx:Declarations> <mx:TabNavigator width="500" height="300" x="100" y="0"> <s:NavigatorContent label="ONE" hideEffect="{hideEffect}"> <s:BorderContainer backgroundColor="0xFF0000" height="100" width="100"/> </s:NavigatorContent> <s:NavigatorContent label="TWO" hideEffect="{hideEffect}"> <s:BorderContainer backgroundColor="0xFF0000" height="100" width="100"/> </s:NavigatorContent> <s:NavigatorContent label="THREE" hideEffect="{hideEffect}"> <s:BorderContainer backgroundColor="0xFF0000" height="100" width="100"/> </s:NavigatorContent> <s:NavigatorContent label="FOUR" hideEffect="{hideEffect}"> <s:BorderContainer backgroundColor="0xFF0000" height="100" width="100"/> </s:NavigatorContent> </mx:TabNavigator> </s:Application> Screenshot: hideEffectBug Any ideas how to fix this bug?

    Read the article

  • Access a view inside a tab navigator when a tab is clicked

    - by magnus.lassi
    Hi, I I have a view in Flex 3 where I use a tab navigator and a number of views inside the tab navigator. I need to be know which view was clicked because of it's one specific view then I need to take action, i.e. if view with id "secondTab" is clicked then do something. I have set it up to be notified, my problem is that I need to be able to know what view it is. Calling tab.GetChildByName or a similar method seems to only get me back a TabSkin object. <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" xmlns:local="*" creationComplete="onCreationComplete(event)"> <mx:Script> <![CDATA[ import mx.events.FlexEvent; import mx.controls.Button; protected function onCreationComplete(event:Event):void { for(var i:int = 0; i < myTN.getChildren().length; i++) { var tab:Button = myTN.getTabAt(i); tab.addEventListener(FlexEvent.BUTTON_DOWN, tabClickHandler); } } private function tabClickHandler(event:FlexEvent):void { var tab:Button; if(event.currentTarget is Button) { tab = event.currentTarget as Button; // how do I access the actual view hosted in a tab that was clicked? } } ]]> </mx:Script> <mx:TabNavigator id="myTN"> <local:ProductListView id="firstTab" label="First Tab" width="100%" height="100%" /> <local:ProductListView id="secondTab" label="Second Tab" width="100%" height="100%" /> </mx:TabNavigator> </mx:VBox>

    Read the article

  • TextArea component is null on applicationComplete event

    - by Alan G.
    I have a weird issue (weird because it is specific to one component) with applicationComplete in a fairly simple application. All the UI components are declared in MXML. I can access them all in applicationComplete, but not a spark.components.TextArea component, named taStatus here; it is null in the handler. MXML looks sort of like this (there are lots of other components, but nothing special) <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="710" minHeight="640" applicationComplete="onApplicationComplete(event)" width="710" height="640"> <mx:TabNavigator left="15" right="15" top="15" bottom="340" paddingTop="0"> <s:NavigatorContent label="General" width="100%" height="100%"> <s:Label x="93" y="71" text="Label" id="lblTest"/> </s:NavigatorContent> <s:NavigatorContent label="Status" width="100%" height="100%"> <s:TextArea id="taStatus" width="100%" height="100%" text="Startup." editable="false"/> </s:NavigatorContent> </mx:TabNavigator> <fx:Script source="main.as" /> </s:Application> Here is the handler in main.as protected function onApplicationComplete(event: FlexEvent) : void { lblTest.text = 'abc789'; // OK taStatus.text = 'abc789'; // Fail } TypeError: Error #1009: Cannot access a property or method of a null object reference. So taStatus is null... What is so special about this TextArea?

    Read the article

  • Can we identify individual sectors of a circle component uniquely in flex?

    - by Angeline Aarthi
    I have a custom circle component in my application, which is divided into 3 sectors as of now.Can we uniquely identify each segments of this circle? I want to drag and drop text or images from another container to this circle component. But I want to place different images in the different sectors. Is it possible to distinguish the individual sectors of the circle component? Here is my code: <mx:TabNavigator width="624" height="100%"> <mx:VBox id="currQuote" label="Currents Quote" width="100%"> <comp:MyCircle x1="175" y1="150" radius="150"/> <comp:MyCircle x1="175" y1="150" radius="120"/> <comp:MyCircle x1="175" y1="150" radius="25"/> <comp:MyLine x1="160" y1="122"/> </mx:VBox> <mx:VBox label="Quote Comparison" width="100%"/> <mx:VBox label="Reports" width="100%"/> </mx:TabNavigator> Circle component: package components { import mx.core.UIComponent; public class MyCircle extends UIComponent { public var x1:int; public var y1:int; public var radius:int; override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { graphics.lineStyle(1, 0x000000); graphics.drawCircle(x1, y1, radius); } } } Line component: package components { import mx.core.UIComponent; public class MyLine extends UIComponent { public var x1:int; public var y1:int; override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { graphics.lineStyle(1, 0x000000); graphics.moveTo(100,0); graphics.lineTo(x1, y1); graphics.moveTo(250,0); graphics.lineTo(185,120); } } } Actually I want the circle to be divided into 6 sectors, but for now just divided it into 3 sectors. But is it possible to uniqulely identify the individual sectors of the circle so that I can drag different images or texts into those particular sectors?

    Read the article

  • how to get mxml file in ActionScript class

    - by nemade-vipin
    hello friend I want to refer my mxml file into Actionscript class.My code is :- Mxml file is :- var User:Authentication; User = new Authentication(); User.authentication(); } ]] <mx:Panel width="100%" height="100%" layout="absolute"> <mx:TabNavigator width="100%" height="100%" id="viewstack2"> <mx:Form label="Login Form" id="loginform"> <mx:FormItem label="Mobile no:" creationPolicy="all"> <mx:TextInput id="mobileno"/> </mx:FormItem> <mx:FormItem label="Password:" creationPolicy="all"> <mx:TextInput displayAsPassword="true" id="password" /> </mx:FormItem> <mx:FormItem> <mx:Button label="Login" click="authentication()"/> </mx:FormItem> </mx:Form> <mx:Form label="Child List"> <mx:Label width="100%" color="blue" text="Select Child."/> </mx:Form> </mx:TabNavigator> </mx:Panel> Action script class is package SBTSBusineesObject { import generated.webservices.*; import mx.collections.ArrayCollection; import mx.controls.Alert; import mx.rpc.events.FaultEvent; public class Authentication { [Bindable] private var childName:ArrayCollection; [Bindable] private var childId:ArrayCollection; private var photoFeed:ArrayCollection; private var arrayOfchild:Array; private var newEntry:GetSBTSMobileAuthentication; public var user:SBTSWebService; public var mxmlobj:SBTS =null; public function authentication():void { user = new SBTSWebService(); mxmlobj = new SBTS(); if(user!=null) { user.addSBTSWebServiceFaultEventListener(handleFaults); user.addgetSBTSMobileAuthenticationEventListener(authenticationResult); newEntry = new GetSBTSMobileAuthentication(); if(newEntry!=null) { if(mxmlobj != null) { newEntry.mobile = mxmlobj.mobileno.text ; newEntry.password=mxmlobj.password.text; } user.getSBTSMobileAuthentication(newEntry); } } } public function handleFaults(event:FaultEvent):void { Alert.show("A fault occured contacting the server. Fault message is: " + event.fault.faultString); } public function authenticationResult(event:GetSBTSMobileAuthenticationResultEvent):void { if(event.result != null && event.result._return>0) { if(event.result._return > 0) { var UserId:int = event.result._return; if(mxmlobj != null) { mxmlobj.loginform.enabled = false; mxmlobj.viewstack2.selectedIndex=1; } } else { Alert.show("Authentication fail"); } } } } }

    Read the article

  • Problem to cretate dynamic radio button in flex.

    - by nemade-vipin
    hi friends, I am creating the flex ARI application in which I am accessing the webservice method this method is returning me a childList.I am accessing it in my flex appliction using the Array object in my action script code.Now I want to cretate one flex page in which I get child list with radio button.I have done it using Arraycollection in which i put all the child name.Now I am getting each child name in mxml using the Repeater component in mxml.But I have problem is that I am getting the only list of child name.I also want to get child id for to set value for each radio button. how can I refer same childname and it's id for radio button using same Arraycollection list.my code is import mx.controls.*; [Bindable] private var childName:ArrayCollection; private var photoFeed:ArrayCollection; private var arrayOfchild:Array; [Bindable] private var childObj:Child; public var user:SBTSWebService; public function initApp():void { user = new SBTSWebService(); user.addSBTSWebServiceFaultEventListener(handleFaults); } public function displayString():void { // Instantiate a new Entry object. var newEntry:GetSBTSMobileAuthentication = new GetSBTSMobileAuthentication(); newEntry.mobile=mobileno.text; newEntry.password=password.text; user.addgetSBTSMobileAuthenticationEventListener(authenticationResult); user.getSBTSMobileAuthentication(newEntry); } public function handleFaults(event:FaultEvent):void { Alert.show("A fault occured contacting the server. Fault message is: " + event.fault.faultString); } public function authenticationResult(event:GetSBTSMobileAuthenticationResultEvent):void { if(event.result != null) { if(event.result._return > 0) { var UserId:int = event.result._return; getChildList(UserId); viewstack2.selectedIndex=1; } else { Alert.show("Authentication fail"); } } } public function getChildList(userId:int):void { var childEntry:GetSBTSMobileChildrenInfo = new GetSBTSMobileChildrenInfo(); childEntry.UserId = userId; user.addgetSBTSMobileChildrenInfoEventListener(sbtsChildrenInfoResult); user.getSBTSMobileChildrenInfo(childEntry); } public function sbtsChildrenInfoResult(event:GetSBTSMobileChildrenInfoResultEvent):void { if(event.result != null && event.result._return!=null) { arrayOfchild = event.result._return as Array; photoFeed = new ArrayCollection(arrayOfchild); childName = new ArrayCollection(); for( var count:int=0;count<photoFeed.length;count++) { childObj = photoFeed.getItemAt(count,0) as Child; childName.addItem(childObj.strName); } } } ]]> <mx:Panel width="500" height="300" headerColors="[#000000,#FFFFFF]"> <mx:TabNavigator id="viewstack2" selectedIndex="0" creationPolicy="all" width="100%" height="100%"> <mx:Form label="Login Form"> <mx:FormItem label="Mobile NO:"> <mx:TextInput id="mobileno" /> </mx:FormItem> <mx:FormItem label="Password:"> <mx:TextInput displayAsPassword="true" id="password" /> </mx:FormItem> <mx:FormItem> <mx:Button label="Login" click="displayString()"/> </mx:FormItem> </mx:Form> <mx:Form label="Child List"> <mx:Label width="100%" color="blue" text="Select Child."/> <mx:RadioButtonGroup id="radioGroup" /> <mx:Repeater id="fieldRepeater" dataProvider="{childName}"> <mx:RadioButton groupName="radioGroup" label="{fieldRepeater.currentItem}"/> </mx:Repeater> </mx:Form> <mx:Form label="Child Information"> </mx:Form> <mx:Form label="Trace Path"> </mx:Form> </mx:TabNavigator> </mx:Panel> please tell me the sol.

    Read the article

  • problem to genrate swf file.

    - by nemade-vipin
    hello friend I have created one flex Air application where I have created the one authentication actionscript class. and one mxml file.This complete application using webservice and google map API. but when I am building application it is not genrating the SWF file in bin-debug folder. that is changes not reflecting in our application. my code is:- Action script class is :- package src { import adobe.utils.XMLUI; import mx.rpc.events.FaultEvent; import mx.controls.Alert; import generated.webservices.*; import mx.collections.ArrayCollection; public class Authentication { [Bindable] private var childName:ArrayCollection; [Bindable] private var childId:ArrayCollection; private var photoFeed:ArrayCollection; private var arrayOfchild:Array; private var newEntry:GetSBTSMobileAuthentication; public function authentication():void { // Instantiate a new Entry object. user = new SBTSWebService(); if(user!=null) { user.addSBTSWebServiceFaultEventListener(handleFaults); user.addgetSBTSMobileAuthenticationEventListener(authenticationResult); newEntry = new GetSBTSMobileAuthentication(); if(newEntry!=null) { newEntry.mobile=mobileno.text; newEntry.password=password.text; user.getSBTSMobileAuthentication(newEntry); } } } public function handleFaults(event:FaultEvent):void { Alert.show("A fault occured contacting the server. Fault message is: " + event.fault.faultString); } public function authenticationResult(event:GetSBTSMobileAuthenticationResultEvent):void { if(event.result != null && event.result._return>0) { if(event.result._return > 0) { var UserId:int = event.result._return; loginform.enabled = false; //getChildList(UserId); viewstack2.selectedIndex=1; } else { Alert.show("Authentication fail"); } } } } } mxml file is :- import src.Authentication; var user:Authentication = new Authentication(); ]]> <mx:TabNavigator id="viewstack2" selectedIndex="0" creationPolicy="all" width="100%" height="100%"> <mx:Form label="Login Form" id="loginform"> <mx:FormItem label="Mobile NO:"> <mx:TextInput id="mobileno"/> </mx:FormItem> <mx:FormItem label="Password:"> <mx:TextInput displayAsPassword="true" id="password" /> </mx:FormItem> <mx:FormItem> <mx:Button label="Login" click="user.authentication()"/> </mx:FormItem> </mx:Form> <mx:Form label="Child List"> <mx:Label width="100%" color="blue" text="Select Child."/> </mx:Form> <mx:Form label="Child Information"> </mx:Form> <mx:Form label="Bus Location"> </mx:Form> <mx:Form label="Bus path"> </mx:Form> </mx:TabNavigator> </mx:Panel>

    Read the article

  • Flex 4: Traversing the Stage More Easily

    - by Steve
    The following is a MXML Module I am producing in Flex 4: <?xml version="1.0" encoding="utf-8"?> <mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="init()" layout="absolute" width="100%" height="100%"> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <fx:Style source="BMChartModule.css" /> <s:Panel id="panel" title="Benchmark Results" height="100%" width="100%" dropShadowVisible="false"> <mx:TabNavigator id="tn" height="100%" width="100%" /> </s:Panel> <fx:Script> <![CDATA[ import flash.events.Event; import mx.charts.ColumnChart; import mx.charts.effects.SeriesInterpolate; import mx.controls.Alert; import spark.components.BorderContainer; import spark.components.Button; import spark.components.Label; import spark.components.NavigatorContent; import spark.components.RadioButton; import spark.components.TextInput; import spark.layouts.*; private var xml:XML; private function init():void { var seriesInterpolate:SeriesInterpolate = new SeriesInterpolate(); seriesInterpolate.duration = 1000; xml = parentApplication.model.xml; var sectorList:XMLList = xml.SECTOR; for each(var i:XML in sectorList) { var ncLayout:HorizontalLayout = new HorizontalLayout(); var nc:NavigatorContent = new NavigatorContent(); nc.label = i.@NAME; nc.name = "NC_" + nc.label; nc.layout = ncLayout; tn.addElement(nc); var cC:ColumnChart = new ColumnChart(); cC.percentWidth = 70; cC.name = "CC"; nc.addElement(cC); var bClayout:VerticalLayout = new VerticalLayout(); var bC:BorderContainer = new BorderContainer(); bC.percentWidth = 30; bC.layout = bClayout; nc.addElement(bC); var bClabel:Label = new Label(); bClabel.percentWidth = 100; bClabel.text = "Select a graph to view it in the column chart:"; var dpList:XMLList = sectorList.(@NAME == i.@NAME).DATAPOINT; for each(var j:XML in dpList) { var rB:RadioButton = new RadioButton(); rB.groupName = "dp"; rB.label = j.@NAME; rB.addEventListener(MouseEvent.CLICK, rBclick); bC.addElement(rB); } } } private function rBclick(e:MouseEvent):void { var selectedTab:NavigatorContent = this.tn.selectedChild as NavigatorContent; var colChart:ColumnChart = selectedTab.getChildByName("CC") as ColumnChart; trace(selectedTab.getChildAt(0)); } ]]> </fx:Script> </mx:Module> I'm writing this function rBclick to redraw the column chart when a radio button is clicked. In order to do this I need to find the column chart on the stage using actionscript. I've currently got 3 lines of code in here to do this: var selectedTab:NavigatorContent = this.tn.selectedChild as NavigatorContent; var colChart:ColumnChart = selectedTab.getChildByName("CC") as ColumnChart; trace(selectedTab.getChildAt(0)); Getting to the active tab in the tabnavigator is easy enough, but then selectedTab.getChildAt(0) - which I was expecting to be the chart - is a "spark.skin.spark.SkinnableContainerSkin"...anyway, I can continue to traverse the tree using this somewhat annoying code, but I'm hoping there is an easier way. So in short, at run time I want to, with as little code as possible, identify the column chart in the active tab so I can redraw it. Any advice would be greatly appreciated.

    Read the article

  • Getting error to access webservice.

    - by nemade-vipin
    hi friend, I have created webapplication in which I am getting the error:- ypeError: Error #1009: Cannot access a property or method of a null object reference. at FlexSBTSApp/displayString()[E:\Users\User1\Documents\Flex Builder 3\FlexSBTSApp\src\FlexSBTSApp.mxml:38] at FlexSBTSApp/___FlexSBTSApp_Button1_click()[E:\Users\User1\Documents\Flex Builder 3\FlexSBTSApp\src\FlexSBTSApp.mxml:118] my code is:- import mx.controls.*; [Bindable] private var childName:ArrayCollection; [Bindable] private var childId:ArrayCollection; private var photoFeed:ArrayCollection; private var arrayOfchild:Array; [Bindable] private var childObj:Child; public var user:SBTSWebService; public function initApp():void { user = new SBTSWebService(); user.addSBTSWebServiceFaultEventListener(handleFaults); } public function displayString():void { // Instantiate a new Entry object. var newEntry:GetSBTSMobileAuthentication = new GetSBTSMobileAuthentication(); newEntry.mobile=mobileno.text; newEntry.password=password.text; user.addgetSBTSMobileAuthenticationEventListener(authenticationResult); user.getSBTSMobileAuthentication(newEntry); } public function handleFaults(event:FaultEvent):void { Alert.show("A fault occured contacting the server. Fault message is: " + event.fault.faultString); } public function authenticationResult(event:GetSBTSMobileAuthenticationResultEvent):void { if(event.result != null && event.result._return>0) { if(event.result._return > 0) { var UserId:int = event.result._return; getChildList(UserId); viewstack2.selectedIndex=1; } else { Alert.show("Authentication fail"); } } } public function getChildList(userId:int):void { var childEntry:GetSBTSMobileChildrenInfo = new GetSBTSMobileChildrenInfo(); childEntry.UserId = userId; user.addgetSBTSMobileChildrenInfoEventListener(sbtsChildrenInfoResult); user.getSBTSMobileChildrenInfo(childEntry); } public function sbtsChildrenInfoResult(event:GetSBTSMobileChildrenInfoResultEvent):void { if(event.result != null && event.result._return!=null) { arrayOfchild = event.result._return as Array; photoFeed = new ArrayCollection(arrayOfchild); childName = new ArrayCollection(); for( var count:int=0;count<photoFeed.length;count++) { childObj = photoFeed.getItemAt(count,0) as Child; childName.addItem(childObj.strName); } } } ]]> <mx:Panel width="500" height="300" headerColors="[#000000,#FFFFFF]"> <mx:TabNavigator id="viewstack2" selectedIndex="0" creationPolicy="all" width="100%" height="100%"> <mx:Form label="Login Form"> <mx:FormItem label="Mobile NO:"> <mx:TextInput id="mobileno" /> </mx:FormItem> <mx:FormItem label="Password:"> <mx:TextInput displayAsPassword="true" id="password" /> </mx:FormItem> <mx:FormItem> <mx:Button label="Login" click="displayString()"/> </mx:FormItem> </mx:Form> <mx:Form label="Child List"> <mx:Label width="100%" color="blue" text="Select Child."/> <mx:RadioButtonGroup id="radioGroup"/> <mx:Repeater id="fieldRepeater" dataProvider="{childName}"> <mx:RadioButton groupName="radioGroup" label="{fieldRepeater.currentItem}" value="{fieldRepeater.currentItem}"/> </mx:Repeater> </mx:Form> <mx:Form label="Child Information"> </mx:Form> <mx:Form label="Trace Path"> </mx:Form> </mx:TabNavigator> </mx:Panel>

    Read the article

  • Increase the height of Flex Container dynamically and introduce scrollbar on the browser

    - by shruti
    Hi, I am trying to increase the height of container with increase in the number of contents inside the container. Like in my case i m using tileList inside tabNavigator , when I put contents inside the tileList, the height of tileList does not increase beyond vertical height of the viewport. It puts scrollbar on the container. I want to increase the height of an flex container with increase in the contents and introduce scrollbar on the browser with increase in contents in the flex container. Could anybody please suggest me how I could achieve this. Thanks in advance.

    Read the article

  • Flex - Tab View Multiple DataGrids and same dataProvider

    - by user283403
    I have a flex application in which I have a TabNavigator with multiple tabs and a datagrid in each of those tabs. I have bound s single array of data to each grid. What I want to do is to bind each grid with a particular set of data in that array i.e. to distribute array contents among grids based on data type. For example items starting with letter A could be displayed in first grid, B in second, starting with C in third and so on. Hence you can say alphabetically distribute the data on different grids. The problem is that the data will be added randomly by the user. To make one data array for each grid is not an option (due to design restrictions). Any suggestions please? Thanks in advance

    Read the article

  • Problem to display 3D google map.

    - by nemade-vipin
    hello friends, I have implemented one Flex application in which I want to display 3D google map.In which I am getting the error the NUll object reference during map display. Here is my code:- import com.google.maps.controls.MapTypeControl; import adobe.utils.XMLUI; import mx.rpc.events.FaultEvent; import mx.controls.Alert; import generated.webservices.*; import mx.collections.ArrayCollection; import mx.controls.*; import generated.webservices.*; import com.google.maps.LatLng; import com.google.maps.Map3D; import com.google.maps.MapEvent; import com.google.maps.MapMouseEvent; import com.google.maps.services.GeocodingEvent; import com.google.maps.services.ClientGeocoder; import com.google.maps.overlays.Marker; import com.google.maps.InfoWindowOptions; import com.google.maps.MapOptions; import com.google.maps.MapType; import com.google.maps.View; import com.google.maps.controls.NavigationControl; import com.google.maps.geom.Attitude; import mx.controls.Alert; [Bindable] private var childName:ArrayCollection; [Bindable] private var childId:ArrayCollection; private var photoFeed:ArrayCollection; private var trackinginfochild:TrackingInfo; private var arrayOfchild:Array; private var newEntry:GetSBTSMobileAuthentication; private var trackinginfo:GetSBTSTrackingInfo; private var childObj:Child; private var UserId:int; private var lat:int; private var long:int; private var latlong:LatLng; public var user:SBTSWebService; public function authentication():void { // Instantiate a new Entry object. user = new SBTSWebService(); if(user!=null) { user.addSBTSWebServiceFaultEventListener(handleFaults); user.addgetSBTSMobileAuthenticationEventListener(authenticationResult); newEntry = new GetSBTSMobileAuthentication(); if(newEntry!=null) { newEntry.mobile=mobileno.text; newEntry.password=password.text; user.getSBTSMobileAuthentication(newEntry); } } } public function handleFaults(event:FaultEvent):void { Alert.show("A fault occured contacting the server. Fault message is: " + event.fault.faultString); } public function authenticationResult(event:GetSBTSMobileAuthenticationResultEvent):void { if(event.result != null && event.result._return>0) { if(event.result._return > 0) { UserId = event.result._return; loginform.enabled = false; getChildList(UserId); viewstack2.selectedIndex=1; } else { Alert.show("Authentication fail"); } } } public function getChildList(userId:int):void { var childEntry:GetSBTSMobileChildrenInfo = new GetSBTSMobileChildrenInfo(); childEntry.UserId = userId; user.addgetSBTSMobileChildrenInfoEventListener(sbtsChildrenInfoResult); user.getSBTSMobileChildrenInfo(childEntry); } public function sbtsChildrenInfoResult(event:GetSBTSMobileChildrenInfoResultEvent):void { if( event.result._return!=null) { arrayOfchild = event.result._return as Array; photoFeed = new ArrayCollection(arrayOfchild); childName = new ArrayCollection(); for( var count:int=0;count<photoFeed.length;count++) { childObj = photoFeed.getItemAt(count,0) as Child; childName.addItem(childObj.strName); } } } private function trackingInfo():void { for( var count:int=0;count user.getSBTSTrackingInfo(trackinginfo); } } } } private function getTrackingInfo(event:GetSBTSTrackingInfoResultEvent):void { if(event.result._return != null) { trackinginfochild = event.result._return as TrackingInfo; lat = trackinginfochild.dblLatitude; long = trackinginfochild.dblLongitude; latlong = new LatLng(lat,long); } } private function onMapPreinitialize(event:MapEvent):void { var myMapOptions:MapOptions = new MapOptions(); myMapOptions.zoom = 12; myMapOptions.center = latlong; myMapOptions.mapType = MapType.NORMAL_MAP_TYPE; myMapOptions.viewMode = View.VIEWMODE_PERSPECTIVE; myMapOptions.attitude = new Attitude(20,30,0); buslocation.setInitOptions(myMapOptions); buspath.setInitOptions(myMapOptions); } private function onMapReady(event:MapEvent):void { this.buslocation.addControl(new NavigationControl()); this.buslocation.addControl( new MapTypeControl()); } ]]> <mx:Move id="hideEffect" yTo="-500" /> <mx:Move id="showEffect" xFrom="500"/> <mx:Panel width="100%" height="100%" headerColors="[#000000,#FFFFFF]" hideEffect="{hideEffect}" showEffect="{showEffect}"> <mx:TabNavigator id="viewstack2" selectedIndex="0" creationPolicy="all" width="100%" height="100%"> <mx:Form label="Login Form" id="loginform" hideEffect="{hideEffect}" showEffect="{showEffect}"> <mx:FormItem label="Mobile NO:" creationPolicy="all"> <mx:TextInput id="mobileno"/> </mx:FormItem> <mx:FormItem label="Password:" creationPolicy="all"> <mx:TextInput displayAsPassword="true" id="password" /> </mx:FormItem> <mx:FormItem> <mx:Button label="Login" click="authentication()"/> </mx:FormItem> </mx:Form> <mx:Form label="Child List" id="childForm" hideEffect="{hideEffect}" showEffect="{showEffect}"> <mx:Label width="100%" color="blue" text="Select Child."/> <mx:RadioButtonGroup id="radioGroup" itemClick="trackingInfo()"/> <mx:Repeater id="fieldRepeater" dataProvider="{childName}"> <mx:RadioButton groupName="radioGroup" label="{fieldRepeater.currentItem}" value="{fieldRepeater.currentItem}"/> </mx:Repeater> </mx:Form> <mx:Form label="Child Information" hideEffect="{hideEffect}" showEffect="{showEffect}"> <mx:FormItem> <mx:DataGrid id="childinfo"> <mx:columns> <mx:DataGridColumn headerText="Child Name" dataField="strName"/> <mx:DataGridColumn headerText="School Name" dataField="strSchoolName"/> <mx:DataGridColumn headerText="Pick Up Point" dataField="strPickUpPointName"/> <mx:DataGridColumn headerText="Drop Down Point" dataField="strDropDownPointName"/> </mx:columns> </mx:DataGrid> </mx:FormItem> <mx:FormItem> <mx:Button label="click here to see bus location"/> </mx:FormItem> </mx:Form> <mx:Form label="Bus Location" hideEffect="{hideEffect}" showEffect="{showEffect}"> <maps:Map3D xmlns:maps="com.google.maps.*" mapevent_mappreinitialize="onMapPreinitialize(event)" id="buslocation" width="100%" height="100%" url="http://code.google.com/apis/maps/" key="ABQIAAAAXuX6aG-r_N0-tQNxUEV-vRSE8al1BQssMxLXJiP75kIjR3ssLxT3D52_u94hI-dMIkD72FmnK-P4og"/> </mx:Form> <mx:Form label="Bus path" hideEffect="{hideEffect}" showEffect="{showEffect}"> <maps:Map3D xmlns:maps="com.google.maps.*" mapevent_mappreinitialize="onMapPreinitialize(event)" id="buspath" width="100%" height="100%" url="http://code.google.com/apis/maps/" key="ABQIAAAAXuX6aG-r_N0-tQNxUEV-vRSE8al1BQssMxLXJiP75kIjR3ssLxT3D52_u94hI-dMIkD72FmnK-P4og"/> </mx:Form> </mx:TabNavigator> </mx:Panel> I am getting this error :- TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.google.maps.geom::Geometry$/computeSeparatingAxes() at com.google.maps.geom::TileEnumerator/enumerateTiles() at com.google.maps.core::PerspectiveTilePane/computeOptimalSet() at com.google.maps.core::PerspectiveTilePane/render() at com.google.maps.core::PerspectiveTilePane/configure() at com.google.maps.managers::PerspectiveTileManager/updateView() at com.google.maps.managers::PerspectiveTileManager/initializePanes() at com.google.maps.managers::PerspectiveTileManager/onInitialize() at MethodInfo-190() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298] at com.google.maps.wrappers::BaseEventDispatcher/dispatchEvent() at com.google.maps.wrappers::EventDispatcherWrapper/dispatchEvent() at com.google.maps.core::MapImpl/size() at com.google.maps.core::MapImpl/setSize() at com.google.maps.wrappers::IMapWrapper/setSize() at com.google.maps::Map/internalSetSize() at com.google.maps::Map/onUIComponentResized() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298] at mx.core::UIComponent/dispatchResizeEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:7077] at mx.core::UIComponent/setActualSize()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:6706] at mx.containers.utilityClasses::BoxLayout/updateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\containers\utilityClasses\BoxLayout.as:219] at mx.containers::Form/updateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\containers\Form.as:375] at mx.core::UIComponent/validateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:6351] at mx.core::Container/validateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\Container.as:2677] at mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:622] at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:695] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8628] at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8568] Please resolve my issue.

    Read the article

  • Displaying Flex Object References

    - by Pie21
    I have a bit of a memory leak issue in my Flex application, and the short version of my question is: is there any way (in AcitonScript 3) to find all live references to a given object? What I have is a number of views with presentation models behind each of them (using Swiz). The views of interest are children of a TabNavigator, so when I close the tab, the view is removed from the stage. When the view is removed from the stage, Swiz sets the model reference in the view to null, as it should. I also removeAllChildren() from the view. However when profiling the application, when I do this and run a GC, neither the view nor the presentation model are freed (though both set their references to each other to null). One model object used by the view (not a presenter, though) IS freed, so it's not completely broken. I've only just started profiling today (firmly believing in not optimising too early), so I imagine there's some kind of reference floating around somewhere, but I can't see where, and what would be super helpful would be the ability to debug and see a list of objects that reference the target object. Is this at all possible, and if not natively, is there some light-weight way to code this into future apps for debugging purposes? Cheers.

    Read the article

1