I'm interested in finding out the best approach to this issue, it's not technically difficult but there must be an elegant solution. Basically i have a form that features mostly text inputs, i would like to change the style of the input boxes based on the current state. I can do this in the mxml on each input...
I want to change the view states in my flex app when it resizes in the browser window.I have the swf embedded at 100% x 100%. So when the user resizes the window below a certain width, I want to switch to a different state. I tried adding an event listener like this, but it only fires the event when I resize the swf outside the browser, not inside. I used:
my problem is when i create a button in state 1 and click on it according to code it should make a group in another state named as expand. However according to my code it is still making group in current state 1.
I have figured out a way to change the style of tabs at run time with following logic:
var cssStyle:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".MyTabs"); cssStyle.setStyle("borderColor", "red");
But here ".MyTabs" class is applicable to all the tabs between first and last tab. As per getStyleDeclaration javadoc, it only accepts "class selector" and "type selector" not the id selector.
How can I change the individual tab style at run time?
My group is working on a Flex/AS3 scientific web application that is data intensive. Luckily the only plots involved are line charts. However, each line chart may have multiple traces (up to 24), and each trace may contain up to 2000 points. The user will need to zoom in and out and interact with the data (e.g. data tips, etc.).
The response I'm getting from developers is that's a lot of data to render in a plot in Flash. For reasons beyond the scope of this post, we can't sample the data to reduce the size (this has already been done and nature of the data prevents further sampling).
Rendering speed is critical for this app. What kind of rendering speed should I expect the Flex 4 line chart component to provide for a given number of points (e.g. 1 second to render 1000 points?)
Are there products available that handle plotting large data sets better, which can be incorporated in Flex (I've seen FusionCharts and ZingCharts online but have no idea how they compare with Flex's components)? Of those, which are easy to develop with while still providing a lot of flexibility in look and feel?
I'm trying to setup a DataGrid that contains a column of combo boxes. The values of the combo boxes are defined by data specific to that row. I cannot get this to work though, I'm asking for a solution to this, either fixing what I have below or a recommendation on a different way.One of the columns of my DataGrid has an object derived from a ComboBox for an ItemEditor. The itemEditor is set like this:
I'm working in Flex 4.1, and I have a viewstack and tabbar as my main navigation. A user logs into the application and should then only be able to see what tabs are available to his user level.I am trying to stick with MXML as much as possible, since it works well with the framework. But I'm goin numb thinking about this. What are the common practices for doing this?FYI: the user level is slightly to complex for states. There are lots of options, way to many to comfortably do w/ states and state groups.
Chimp is a pretty cool library for those interested. It's a little old and there doesn't seem to be much motivation to expand it past UIComponents. So for my purposes it wont do.Again, what do you do for setting up these systems?PDATE: I had to compromise, but it actually worked out pretty well in the end. Instead of destructively laying on permissions (having everything available at first and removing the elements thereafter), the system now works constructively. Here's a sample:
[Bindable] public var managePage:ManagePage; [Bindable]
I have a mc which is 3 frames, with labels "Not Selected", "OverState" and "Selected". I add them to the stage with the first block of code, that is fine. The second block of code is my attempt to handle the states of the buttons. A selected mc goes to the correct state but it needs to go to "Not Selected" when another is clicked. My code does not do that. Also how do I handle the problem of MouseOver and MouseOut still working after a button is clicked?
PHP Code: var numBtnArray:Array = new Array; //add number buttons function addNumButtonsToStage():void{ for(var i:int = 0; i < 4;i++){ var numBtn:numBtn_mc = new numBtn_mc(); buttons_mc.addChild(numBtn); [Code] .....
Ok, I am new to Flash and I am using CS3. I just learned about creating lines and choosing their end cap styles and joint style. I created 2 lines that were connected, highlighted both with the selection tool and tried to change the join style to miter. It would not work. I also tried round and bevel but they would not work either. I did this over and over with many different sets of lines, and I could not change the join style. What am I doing wrong?
I have created a style in which i am defining a font family.When i apply this style to label it reflects the font were as there is no change when it is applied to a spark button.I Tried various way to Apply font style but it doesn't work.Other properties work fine except font family. Even i tried creating skin class and set the font family style of label in it. While previewing the skin i can see the changes but when i apply it to buttonApproach 1
If you have two text areas with different styles (fontFamily, weight, color etc) and you copy text from one to the other it also copies the style from the originating text area. Is there any slick way to prevent that?
Here is a sample of code that will illustrate the problem. Type some text in the top box and some text in the bottom, then copy some characters from the top box to the bottom. I'm not using htmltext.[code]...
Is it possible to style the string returned from the labelFunction so I can change color and font of the callout (inside)? Or some other way? (It seems like a big limitation to have that only return a string that is unstylable.)
I'm trying to work out how to use states in my Flex app.I've created two states, State1 and Stage 2. Both are based off the base state. I've created a few visual elements for State1, and given each of them includeIn="State1".But when I'm in design mode and click on State2, these elements are still visible?If I try to delete them while State2 is selected, all that happens is RemoveChild is added to the State2 tag.
I have an app that I am currently using a viewstack to display each page and I am wondering is this the right way to go, or should I use different states (or something else).
The site is powered by a menu bar with the top level items of Home, Tools, Support. Underneath the Tools menu is a submenu with Tool1, Tool2, Tool3. Currently when the user clicks on any of the tools in the Tool submenu I bring up a child container from the viewstack (each child is actually in a separete component).
I have the following panel component called AdvancedPanel with controlBarContent:
<!-- AdvancedPanel.mxml --> <s:Panel> <s:states>
[Code]....
Using the CustomAdvancedPanel inside an application component shows an empty panel with the "Go to edit" button. But when I click it, the "Extra edit button" becomes visible, but the "Show in edit" button inside the controlBar doesn't.
When the CustomAdvancedPanel is empty, without redeclared states and "Extra edit button" the panel works just fine.
I think it is because the State object declared in AdvancedPanel isn't the same as CustomAdvancedPanel, so the state is different, even if they have the same name. However. I can't use the states of AdvancedPanel inside CustomAdvancedPanel without (re)declare them in mxml.
Is there any way to achieve this kind of state-reuse? Or is there a better way to obtain the same result?
I am trying to use global application states to manage roles in my application. How can I use <properties.state> everywhere in my application if I declare it in my top level application?
I am creating an interface that has a few different states for the different steps. For those steps, there is data that I am pulling in from a database to fill certain fields. As of right now I am doing one db query to get all of the data back and want to fill in all of the fields at the same time but it is giving me "access to a null object reference".
It seems as though there is a scope issue when you are trying to access a text input field with actionscript when the state that the text input is in, isn't the current state.For Example (This would throw a "Null object reference" error):
I'm developping an mobile program with the Flex 4.5 SDK, this for my thesis for school. I have a bug in my program that I can't fix. I have a view where I have 2 states. When I change from state my program doesn't listen to the backKey event anymore.
In my flex project i used one option like Link button . If i like it will be open new page contain more information and components . Which container is suitable one ? Where is used viewstack and stages ?
I was recently profiling my application that uses Degrafa States in the skins and noticed that doing so uses more memory than I expected. Between the SetProperty and State, they were using about 10% of the total used application memory.
Would it be better to use css for the state changes and a new skin for each state? or Are there some simple tips to reducing the memory footprint of degrafa?
I have a button with the various states (up/over/down etc) that uses a skin file to render the display. I want to achieve animation between the states. For instance, between the change from 'up' to 'over' I want to fade in a color and a border.
The way I am doing this at the moment is to use viewstates and animate between them using transitions and the mx:AnimateProperty. However, using this method I can only animate one property per viewstate. So only the border, or the color can be animated.
Does anyone know how I can achieve multiple animations on multiple properties of a programmatic button skin?
I am having an issue with flex states in my application. What I am looking to do is on creation complete of the application, obtain a user role guest/user/superUser (based on username and password) from a server, then set the state client side based on that information. My .mxml classes need to include certain graphic elements based on that state. I am running into the issues of including elements based on the states defined at the Application level of the project. I am trying to avoid having to define the states in each .mxml file that needs it.
Below is a very simple example, randomly, if I click the step2 button the state will change but the Step 2 panel will not be there.
I suspect the children of the state are not getting created for some reason, which is why I set the itemCreationPolicy to "immediate", but it makes no difference This is catastrophic for the application because the user is left in limbo and is forced to refresh
State transitions in flex are very helpful. Is it possible to add an automatic state transition between state A and state B in case there is no user response for 5 mins in state A or pop-up an alert?
I have several custom components all of which are included in the parent application.When I try to change state from a custom component, I get an error saying "undefined state: state name". How do I change the state of the application from within a custom component ?