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


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

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

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

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 :: Create Static Frame And Change Content Pages In It?

Sep 2, 2010

I need to create a static frame and a changing content... currently envisaged as frame containing the side panel and header and footer content.

The content panel will call mxml based on the content sought.

a) how is the frame paradigm- with static frame "containing" other content done. I dont want to repeat the header and footer logic in every 'content section' code?

b) how is the hyperlinking between content sections done- using 'states' seems convoluted

View 2 Replies

ActionScript 2.0 :: Content To Load Into The Loader And Have Its Content Change Once Click On The Other Button Flash 8

Aug 15, 2009

I'm have made some buttons (movie clip) and when I click on it, I want a file (home.swf) to load in a loader (mx.contents.loader) and I want the other buttons to do the same, all load into the same loader. I have no Idea how to do that. The way I have it set up now, the home.swf will load over the entire screen and that is not what I want. I just want the content to load into the loader and have its content change once I click on the other buttons. Here is a copy and past of that I have at the moment, I'm using Flash 8 to do it all.

[Code]...

View 1 Replies

ActionScript 3.0 :: Dynamic Content Scroller (from XML) With Hover State

Oct 23, 2009

I was able to get the links working as they should but i can find no way to get the hover effect (not even the doopingTextArea class) I have content coming in through XML (a list of words and link)... I'm trying to create a menu where when you rollover the word the entire background area of that menu item changes color. Just like a CSS menu that creates a hover state that fills the entire background area of that item. Since the content is dynamic, it would need to have a scrollbar that expands/contracts etc.

View 2 Replies

Flash :: Access State In Flex "Current State" From Movie Clip?

Sep 3, 2011

i curious how to access state in flex "Current State" from flash movie clip??..so far i make movie clip in flash and it has button inside with name " button" and i put this flash file into flex in "state 1" flex application..i want to make event handler for "button" that trigger changing state from "state 1" to "state 2" in flex application..and in flex application i do not write anything because i have no idea how to deal with this stuff..

View 1 Replies







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