Flex :: Change Another Component's State?

Oct 2, 2010

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?

View 2 Replies


Similar Posts:


Flex :: Change Component On State Change?

Mar 8, 2010

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

View 1 Replies

Flex :: Component Not Listening To MainApp's State Change?

May 2, 2010

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.

View 2 Replies

Flex :: WindowShade Component Opened State - How To Maintain

Sep 22, 2010

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.

View 1 Replies

Flex :: Determining The State Of The DropIndicator For A Tree Component?

Mar 24, 2011

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:

[code].....

View 2 Replies

Flex :: On State Change?

Jun 23, 2010

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.

View 1 Replies

ActionScript 3.0 :: Flex Accessing Applications View State From Component?

Sep 26, 2009

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]

View 1 Replies

Flex :: Change State With A Function?

Feb 20, 2010

I'm just wonder if its possible to change States via a function in flex?

View 1 Replies

Flex :: How To Change View State

Sep 22, 2010

Following is a simplified version of my mxml:

[Code]...

"A term is undefined and has no properties..." which points me to the line this.parent.currentState='edit'.

View 1 Replies

Flex :: How To Change Button State In AS

Feb 15, 2012

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?

View 2 Replies

ActionScript :: Change The State In Adobe Flex?

Nov 10, 2009

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");

Into something that change the current state.

Here`s my custom InfoWindowTabbedComponent: [URL]

View 1 Replies

Actionscript :: Flex - Run A Function When View State Is Change

Apr 12, 2012

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?

[Code]....

View 2 Replies

Flex :: Listening For Enable/disable State Change?

Dec 2, 2009

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.

View 2 Replies

Flex :: Change State When Hover On Another Spark Element?

Sep 5, 2010

How to set a hover state (upSkin) when hover on another element? This example is not working on spark:

[URL]

Would like to do something like this:

<s:Button id="but1"/>
<s:Button label="change" mouseOver="button2_mouseOverHandler(event)"/>
protected function button2_mouseOverHandler(event:MouseEvent):void{
//make but1 look like I'm hovering it
}

View 1 Replies

Flex :: Why Does MouseOut Of A DataGroup ItemRenderer Cause A State Change

Oct 21, 2010

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:

<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">

[code]....

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.

View 1 Replies

Flex :: Change The Visible State Of Certain Cell While Mouse Over The Row?

Jun 5, 2009

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

------------------------------------------------
| column1 | column2 | column3 (invisible) | row1
| column1 | column2 | column3 (invisible) | row2
------------------------------------------------

how can I show the cell(row1,column3) while the mouse over any column of row1.

View 1 Replies

Flex :: CheckBox Disable State Change When Clicked On Label?

Nov 10, 2010

I would like the native Flex checkBox to change state only, when the box is clicked. If user clicks the label the state shouldn't change.

The click event cannot be muted as it is utilized in parenting components.

how to obtain such functionality? How to detect, that user has clicked the label?

View 3 Replies

Flex :: Change The List ItemRender Depends Of The View State

Jan 11, 2011

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):

[Code]...

View 2 Replies

Flex :: Change Skin Based On Parent Containers State?

Mar 28, 2011

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:

<s:Group id="contentGroup" top="20" left="10" right="10" bottom="10">
<s:layout>
<s:VerticalLayout/>
</s:layout>

[code]....

View 1 Replies

Flex :: Image Swap On Mouse-over And State Change On-click?

Dec 4, 2011

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?

View 1 Replies

Flex :: Dynamically Change Mxml For UI Description And State Transition Logic?

Aug 25, 2011

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.

View 1 Replies

Actionscript 3 :: Flex: Content Not Rendering Correctly After Transitioned State Change?

Mar 1, 2012

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.

View 1 Replies

ActionScript 3.0 :: Flex - Loading Page As One State And The Main Application Design In Another State?

Apr 9, 2011

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.

View 2 Replies

Flex :: Get State Group / Actual State Object For Current?

Mar 30, 2012

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]...

View 1 Replies

Flex :: Set Size Of State After Moved Child State Using AIR?

Jul 25, 2009

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')

<mx:State name="signin">
<mx:SetProperty name="height" value="616"/>
<mx:SetProperty name="width" value="919"/>

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?

View 1 Replies

Flex :: Fade All The Elements Of The Next State When Transitioning From Any State?

Jan 27, 2010

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.

Something like:

<s:Transition fromState="*" toState="*">
<s:Fade target="*" duration="500" />
</s:Transition>

View 2 Replies

Flex :: Creating State Children Before Switching To State

Mar 25, 2010

In my view I have a welcome screen:

[Code]...

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?

View 1 Replies

Flex :: Toggling States - When Other Item Is Selected The First Item Does Not Change Its State?

Apr 26, 2011

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,

<s:BorderContainer id="outerCont" width="275" height="100" borderVisible="false"
backgroundColor.normal="#3D3C3C" backgroundAlpha.selected="0.1"
backgroundColor.selected="{data.color}">

My states are like this,

<s:states>
<s:State name="normal" />
<s:State name="hovered" />[code]........

View 1 Replies

Flex :: How To Change Component Styles In AS3

Nov 4, 2009

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.

View 2 Replies

Flex :: Component Change To A Page With Different Content?

Aug 2, 2010

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.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved