Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
SWT62 #1
Setting constraint values inside states
Hi all, in the code attached I have a state called 'pods1' - I have a canvas
called pod1 when I'm in design view and I change states to 'pods1' it works
fine - but if I change to this state programatically it says 'left' can't be
found in <mx:canvas> object? in design view it can see the paramater and in
code it can't seems strange
Any help much appreciated.
<mx:states>
<mx:State name="pods1">
<mx:SetProperty target="{pod1}" name="left" value="col1:5"/>
<mx:SetProperty target="{pod1}" name="top" value="row1:5"/>
<mx:SetProperty target="{pod1}" name="right" value="col2:5"/>
<mx:SetProperty target="{pod1}" name="bottom" value="row4:8"/>
</mx:State>
SWT62 Guest
-
Get controls values upon auto-postback of another control inside DataGrid
Hi This is edited from post from a while back, there's still something I need to find an answer for (boy datagrids are a headache when you first... -
Attributes on a class to generate parameter values inside XML node
I might have the terms wrong, I'm an XML newbie, but here is what I need to do: I am returning an object in a webservice. public class Profile... -
setting variables inside a php class
I am trying to change the value of a variable inside a class from one of its functions rather than the constructor, but it doesn't seem to work. ... -
setting the input inside a asp page.
Hello! Was thinking of having an array inside a asp page. I'm rather new to this. How do I begin. my asp page should work as follows: 1. One... -
Setting values in an asp:dropdownlist
I have a page that allows users to create a user account. The aspx has various dropdowns that I populate by binding the dropdownlist to a... -
Greg Lafrance #2
Re: Setting constraint values inside states
I'm assuming you can't use this type of state change with constraint based
layout?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Canvas id="pod1" x="1" y="1" backgroundColor="#ffccee">
<mx:Button x="10" y="10" label="Change to pods1 State"
click="currentState='pods1'"/>
<mx:Button x="10" y="40" label="Change to Base State"
click="currentState=''"/>
</mx:Canvas>
<mx:Canvas id="pod2" x="1" y="200"
left="10" right="200" backgroundColor="#ccffee">
<mx:Button x="10" y="170" label="Change to pods2 State"
click="currentState='pods2'"/>
<mx:Button x="10" y="200" label="Change to Base State"
click="currentState=''"/>
</mx:Canvas>
<mx:states>
<mx:State name="pods1">
<mx:SetProperty target="{pod1}" name="x" value="20"/>
<mx:SetProperty target="{pod1}" name="y" value="20"/>
</mx:State>
<mx:State name="pods2">
<mx:SetProperty target="{pod2}" name="left" value="20"/>
<mx:SetProperty target="{pod2}" name="right" value="20"/>
</mx:State>
</mx:states>
</mx:Application>
Greg Lafrance Guest
-
SWT62 #3
Re: Setting constraint values inside states
Thanks for the prompt reply Greg, your examples proves I'm not going mad then!
Is this an omission or by design - do you think?
Thanks
SWT
SWT62 Guest
-
Greg Lafrance #4
Re: Setting constraint values inside states
If it is true that there is no way to do this, I would think it would a design error.
Greg Lafrance Guest



Reply With Quote

