Flex :: Create States And Add Elements At Runtime From Actionscript?

Sep 28, 2010

I wanna add dynamically (at runtime) new states to a container and, to this states, add different elements (like TextInput, Label etc.). This must be done from actionscript, I don't use any mxml file. I can add states and change properties or styles for different elements, but I didn't figured out how to add child elements for different states.

View 1 Replies


Similar Posts:


Flex :: Scroll Elements On Canvas In Different States And In Different Containers And Not Move Others

Dec 2, 2010

I generate panels dynamically and put them in other states in that way so in one state you have a list of panels on the left and one big panel on the right for example in one state and when you click on the list on the left (with small panels) that panels takes the places of the big panel and the big one goes back in the place. So I have 50 panels on the left and i want to scroll them down but I don't want to big panel to go down with them I want it fixed. this is where I got and I don't know how to do that here is my code:

enter code here

protected function canvas1_creationCompleteHandler(event:FlexEvent):void
{
blurEffect= new BlurEffect(myBlur,myUnBlur);
listEventsResult.token=eventService.listEvent();

[Code]....

View 1 Replies

Actionscript 3 :: Flex - Reference Flex Elements Added During Runtime?

Jan 17, 2010

I am having difficulty getting a reference to elements added after compile-time using the 'id' property. I have seen a few forum topics suggesting that this isn't possible, and that getting a reference to elements added this way is trickier, but never just exactly what that trick is. This code throws a fun little: Error: uncaught exception: Error calling method on NPObject! [plugin exception: "ReferenceError: Error #1069: Property canvas_tentpoles_0 not found on SGraph and there is no default value."].

[Code]...

View 2 Replies

Flex :: Create A State That Includes Other States?

Jan 22, 2012

I have a mobile app where I have 3 states in it. There is the default portrait and landscape and I would to add a third state that includes the other two.

<s:states>
<s:State name="portrait"/>
<s:State name="landscape"/>

[code].....

View 1 Replies

Flex :: Dynamically Create F4 AddChild Actions For States?

Dec 27, 2010

I have an application in which I need to create mx.states.State objects on the fly, as I'm reading external data in order to create the states. Each State only has a single child, so here's my code which I was using to accomplish this[code]...

View 2 Replies

Flex :: Create Elements Server Side?

Jun 22, 2011

I wonder if it is possible to pre-configurate Flex Elements on the Server. I have the Problem with a custom ItemRenderer which turns out to be very slow. It would be very cool to pre-process such an element on the server instead in the clients browser... somehow? Maybe it is possible to produce the MXML dynamically on the server for that.

This is it basically. I create a Label for each data entry in an array list. This entry is added to a BorderContainer and this goes to the containing element as a whole here. Sometimes i add 200 - 300 items this way which is costing very high computing cost at client side. So i wonderd if i could just pass this as a whole dynamic mxml element to the client.[code]...

View 1 Replies

Flex :: Create Channels At Runtime Using BlazeDS?

Aug 12, 2010

So as you may or may not know, BlazeDS (open source version of LiveCycle Data Services) is a nice way to get your server-side Java and client-side Flex application to play together. Unfortunately, it does have several pitfalls that need to be corrected. I'll try to explain one of them here.

All of BlazeDS's configuration is written via XML files in the flex/ folder of your webapp. The default names are separated for clarity, such as services-config.xml, remoting-config.xml, messaging-config.xml, etc. In these configuration files (particularly services-config.xml), Channels are defined; these setup URIs and objects used to capture and send information between the server and the client. In these config files, it is quite common to use a syntax like so:

[Code]...

Unfortunately, what they don't tell you is that some of these key-in replacements (ie: {context.root}) are not replaced dynamically upon execution but upon compilation of the WAR file you intend to distribute. Obviously not a good idea when switching domains.

So, instead I seek to dynamically define these channels. According to the documentation, that's all good and fine, but it only works if the channel already exists when the webapp is launched. I feel like that sort of defeats the point. So my question is, how do you truly create channels dynamically so that both the client and the server recognize their existence?

View 1 Replies

Flex :: Create AIR Native Installer With AIR Runtime?

Oct 19, 2011

How can i create native installer for windows, MAC and linux, which will check the system if air runtime is not install in the user system then installer will 1st install the AIR runtime and then the AIR application.

Do we need to use any third party software to achicve this?

For checking system wether the AIR runtime is install or not Do we need to write custom script or installer will automatically get things done.

View 1 Replies

ActionScript 2.0 :: Accessing Authoring Elements Of Component At Runtime

Mar 6, 2007

Is it possible in Flash 8 accessing from the linkage class, associated to a component, the graphics elements (for instance, a standard UI component, like a tree or a comboBox) that are on the movieclip this class refers to?

View 1 Replies

ActionScript :: Create Wrong Regular Expression In Flex Which Will Cause Runtime Error?

Feb 25, 2011

Is it possible to create wrong Regular expression in ActionScript/Flex which will cause runtime error? I've tried so many weird regexpes in Flex and Flex never complained! How do I know If my regexp valid?

View 3 Replies

Flex :: Create A Custom List Item Renderer With Image(base64 Png String) At Runtime?

Mar 28, 2011

I'm trying to create a list with icons. There're a lot of examples but seems all of them are using embedded images.My problem is how can I create the list with icon from base64 png string at runtime?

View 1 Replies

ActionScript 3.0 :: Create Buttons States For MCs?

Nov 25, 2009

I am creating a generic website that would have abstract MCs that would load jpg or TXT fields for the user interface to allow for fast updates to the site. The MCs that would make up the user interface would be empty and load things into it using XML or PHP later on. How would I create button states for the user interface MCs.  I started creating a function for every MC button state but I thought there might be a more efficient way. 
 
and is using URLRequest the way to link to pages with in a movie well the flash movie that is the site it's self?
 
/*---------------------------- THE START OF MY ACTION SCRIPT ------------------------------*/
var waywardLogo_mc:MovieClip = new MovieClip;
var theCollection_mc:MovieClip = new MovieClip;

[Code].....

View 3 Replies

ActionScript 3.0 :: Create A Simple Pie Chart That Has Rollover States?

Feb 22, 2011

I am trying to create a simple pie chart that has rollover states, and when clicked brings up a first column of text, then when a field is clicked brings up a second column and then a third. There will be around 100 different text fields show up. Now at this stage I have about 40 functions setup and about 25 event listeners and I havent even started on the text fields yet.

My question is do I need to continually write new functions for text to appear, then a second to disappear and trigger the next filed OR is this what Variables are for?

I think this sounds very confusing so I have attached the file. Please help as I have a crazy deadline on this and simply can't work it out, unless I continue on my road of endless functions.

View 5 Replies

Flex :: Actionscript 3 - Adding Permssions To Flex 4 UI Without States?

Aug 23, 2010

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]

[code].....

View 2 Replies

Flex :: Flex 4 Changing Style Options With States

Apr 5, 2011

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

[Code]...

View 1 Replies

Flex :: Implementing States In App

Apr 24, 2010

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.

View 1 Replies

Flex :: How To Add More States To Button

Aug 11, 2010

I would like to know if there is a way to add states to a button in flex 4 in addition to the default states that are present.

View 1 Replies

Flash -:: Viewstacks Vs States In Flex?

Jul 23, 2009

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

View 3 Replies

Flex :: Inherit States With Mxml?

Oct 18, 2010

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?

View 5 Replies

Flex :: Use Global Application States?

Mar 8, 2011

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?

View 1 Replies

Flex :: ViewNavigatorApplication States And FirstView?

May 17, 2011

I'm having a crack at making my first Flex mobile application (although I'm not new to Flex), and I've tripped at the first hurdle.

I cannot get ViewNavigatorApplication to display a view when trying to use firstView with states e.g. firstView.phone, firstView.tablet.

I'm just left with a blank action bar and content area.

If I try setting setting firstView with no state (e.g. firstView="view.HomeView") the view loads fine.

[Code]...

View 2 Replies

Actionscript 3 :: Flex 4.5 Scope Between States?

May 29, 2011

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

<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" minWidth="955" minHeight="600"
creationComplete="init()">

[code]....

View 2 Replies

Flex :: Air - Backkeypressedhandler Not Launching With States

Jun 9, 2011

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.

[Code]...

View 1 Replies

Flash :: What Is Difference Viewstack And States In Flex

Jul 21, 2009

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 ?

View 2 Replies

Flex - Degrafa States Memory Management?

Nov 10, 2009

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?

View 1 Replies

Flex :: Animate Between States In A Programmatic Skin?

May 12, 2010

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?

View 3 Replies

Flex :: Declare Component States In ActionScript?

Sep 15, 2010

In mxml you declare states like this[code]...

How do you acheive the same in an ActionScript class? Apparently it's the same in Flex 3 and Flex 4, whatever it is.

View 2 Replies

Flex :: 4 - Is There A Way To Have Global 4 States (user Roles)

Sep 16, 2010

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.

[Code]...

View 1 Replies

Flex :: Flashbuilder 4 Gumbo States Are Sometimes Blank?

Nov 19, 2010

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

<s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationPolicy="all" currentState="step1">

[code]....

View 2 Replies

Actionscript 3 :: Add Automatic Transition To Flex States?

Nov 25, 2010

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?

View 1 Replies







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