I currently use: Flexglobals.toplevelapplication.component1.compnent2.currentState = 'something';is there a better way of doing do? Can I bind the state of a components to variable in my model?
I've got a whole bunch of data being displayed in different Labels, now I'm adding an edit state. I'd like all the labels to "transform" into TextInputs. I was just wondering if it possible to uses states to change
I don't know if this is too difficult or too easy. My custom component is trying to listen to the main application's state changes using StateChangeEvent.CURRENT_STATE_CHANGE, but it's reporting its own state changes.
I have flexlib WindowShade component in repeater in my Flex + AIR application. <mx:XML id="mainMenuXML"><items> <item value="abc" /> <item value="xyz" /> <item value="lmn" /> </items></mx:XML>
Now in button1 click handler I am appending child in XML(mainMenuXML) resulting adding one more windowshade instance. But the problem is it opens all the windowshade instances. I need to maintain the opened states after adding a new windowshade instance.
For example: Initially I get 3 windoshades with labels: abc, xyz, lmn all opened. Now I close the xyz windowshade instance(by clicking on the header) Now I click on button which appends child in mainMenuXML and also add a windowshade instance with some label "pqr". But now I see all the windowshade instances opened. But it should be like abc, lmn, pqr should be opened & xyz closed(property opened="false").
How to maintain the opened true/false state of windowshade instances. I tried to add a property in dataprovider Bindable to opened property of windhowshade but didn't worked for me.
I have a custom class that extends the Tree component so I can add some logic to the drag and drop functionality and not allow folders to be dropped inside folders.In the dragOver function, I am using:
var currNodeOver:TreeItemRenderer = TreeItemRenderer(indexToItemRenderer(calculateDropIndex(event))); to determine the drop target, and setting:
I have a button with a click event of "currentState='someState'". Is there a way to tell component to do some function like for example "Function()" when the state changes to "someState"? So execute a function when the state is changed.
In Flex Builder 3, I am trying to access the main applications view state from within a component.On initialize I show the Loginpage-component. When I click the login button I want to hide the loginpage and show my "controlpanel" page, which also is a component.I try with this, and also placing this function in the main application.[code]
I can do this: <s:Button id="Btn" enabled.State1="false" /> But the following code is giving me an error. private function enableDisable():void{ Btn.enabled.State1="false"; //Error: Access of undefined property State1 } How to code enabled.State1 in ActionScript?
I want to implement this script: [URL]...that is doing this "magic [URL]
...but I want to tweak it a little on InfoWindowTabbedComponent. To be more precisely I`m trying to insert links in that tabs, and when you click one the state will change.
You can see my custom InfoWindowTabbedComponent at the end of the post As you can see, right now I have 2 functions that open url`s.
What I`m trying to do is to change this:
var adobeURL:URLRequest = new URLRequest("http://www.microsoft.com" ); navigateToURL(adobeURL, "_self");
I am learning Flex and trying to make a simple RPG to practice. I am using view states to change between screens. right now I have a HomeView.mxml which displays my character information, InventoryView.mxml which shows my inventory items, and EquipmentView.mxml which shows the equipped items. They each have their respective view states.
in my main mxml file, i create a global variable for the character and an ArrayCollection of items in the game. it creates 2 labels in mxml for Inventory and Equipment and when i click on the label it calls a click handler which sets currentState="EquipmentView" or "InventoryView" This works and the state changes and the respective views are shown properly. My problem is in my EquipmentView state. When i enter the state the first time, it has a creationComplete function which displays images for my equipment and sets a click handler. when i click the item, it "unequips" it and removes it from the equipment list and removes the image. this also works fine, but when I go to my inventory view and "equip" an item and return to the EquipmentView, the image does not show. I have a label which counts the length of my equipmentList variable and that is accurate when i switch views, but i cant get the image to display again. Is there a way to call my displayEquippedItems() function (which is originally called on creationComplete) when the view is changed?
For my custom components, when they go from enabled to disabled or disabled to enabled, I want to trigger a custom event. I can't find any related events in the livedocs.
I've found a very annoying problem with the itemRenderers in a DataGroup in flex 4, when I mouseout of the itemRenderer is returns to its default state. Here's an example:
When the user clicks on the button the VGroup is collapsed as expected, but then if a user moves their mouse out of the item renderer it then collapses, i.e. returns to its default state.
I have three columns and the default visible state of last column is false.My problem is how can I change the visible state of the certain cell while the mouse over any part of the row
I have one list, which the item render it`s like this:link. But now I need to enable or disable the button delete depends the view state which my List is inside. This is my view(which contains the list):
I have a custom component ExpandCollapseMenu that extends SkinnableContainer.This component can have state "normal" or "expanded".Inside this component I have buttons, with different skin based on ExpandCollapseMenu's state.This works fine when defining the buttons inside ExpandCollapsMenu's skin class:
I am learning Flex and have an image I would like to changed on mouseover, and switch to another state on click.I do not want to use any of the buttons available in Flex.Does anyone know th code to achiev what I want?
I want to use Adobe mxml to create a swf. However, the mxml gets compiled to swf itself and is not available after creating the swf. I want to add states with UI components without compiling it every-time.
I have a component with 2 states and I have added transitions for switching between the states, where 2 Move affects are applied to 2 different objects. This all works fine, however, after the transition from the first state to the second has completed the second state doesn not render correctly. It contains a TextInput control which is not visible, and a Button with a custom skin that is only sometimes visible and vanishes if you click on it. I have tried called invalidateDisplayList() and validateNow() after loading the second state but that has done nothing. I also have a VBox with a cornerRadius property set, strangely this does not seem to apply anymore and the corners are square, where they displayed correctly before I added the transition in.Here is the code for my states and their transitions:
<!-- different states of this component --> <mx:states> <s:State name="useForFree"[code].....
where the variables being set as masks are UIComponent instances where I have used their graphics property to draw a rectangle.
It's my understanding that view states can be useful when switching the layout of design elements. Such as, a loading page as one state and the main application design in another state. Is this the correct use of them? Additionally, I have a label in State1 and I cannot figure out how to access that label via actionscript. labelID.text = "New Text"; is not working.
I'm using Flex 4.5 and trying to take advantage of the new state groups feature. I have two States (call them readType1 and readType2) that both belong to the same stateGroup (call it readOnly). There are several places where I'd like to do something based on the current state, and it would be the same thing for the two read states. [code]...
In my air project i used current state size is width="441" height="358" . i have link button like Singin then move to singin state (currentstate='singin')
So application resize into 616,919 . After that function finished move to current state like(currentstate='') But size not be changed . How can i set the size for current state?
I want to fade all the elements of the next state when transitioning from any state.I tried different things but I can't get it to work. And I don't want to manually add transitions for every state.
Which is a pretty small component and I have panelContainer:
[Code]...
Whilst the user is reading the warm and fuzzy welcome note in the welcome state I want to be creating the big expensive panels state so taht when we switch there is no delay. Before the panels state is set panelView is null but I presume there must be an IDefferredInstance floating around somewhere that I can use to kick off the creation of the view. How can I get hold of it?
I have used states in my application.The thing is I have made the first item in my list to be selected. so I gave like this,
if(itemIndex == 0) this.currentState="selected";
this works fine.The problem is when other item is selected the first item does not change its state,it remains in the selected state until its clicked.My code looks like this,
In MXML, there is a Button class which you can instantiate like so: <mx:Button id="something /> But what if you wanted to dynamically build this in AS3 and add it to the Flex app dynamically, without the use of components (just AS3) and then modify Flex's styles, for example, here you access the Button's properties and set them:
var btn:Button = new Button(); btn.height = 50; btn.width = 75; btn.x = 100; btn.y = 40;
But how would you go about changing the Style, for example: btn.downSkin = "something"; btn.color = "0xfffff";
I'm sort of starting to lean towards making a flex component in MXMLand than just making it visible true/false, but I like the fact that i create an object in AS3 and then destroy it when I don't need it anymore, than create it again once needed.
I want to create a flex web page. Basically I have some menubaritems at the top and when I click at one of the dropdowns from the menubar, the component would change to a page with different content.