Flex :: Use States To Implement Menu And Screens For An Application?
Dec 20, 2011
I am making a game. And this time trying to implement menu (-->tutorial) -> game-> scoreboard -> game over screens.
These screens themselves are quite different in terms of structure. So i am not sure if states is a 100% correct approach here (as I understand states are good for similar layouts) From the other hand many of them has back button to return to previous state, e.g. in tutorial I will have start game and back to menu buttons, etc.
I have several screens for flash and these screen have so many dynamic texts. We need to support these texts in different languages like "Spanish", French and English.
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 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 ?
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:
I want to use Log4Fx to log button clicks from a state as i have a state based application with transitions.So on each button click I want to log which state was the user in while he clicked the button because the state change happens on a button click. Can someone suggest a code snippet?
I have a main class that calls and removes screens with addChild and removeChild, these screens are movie clips.My issue lies in these movie clips, each clip is linked to a class - e.g. confidence.as links to my confidence screen.I am trying to add buttons and pieces of text from this class file onto the confidence screen, so essentially adding more movieclips on top of a movieclip that has already been added. I keep getting this error:TypeError: Error #2007: Parameter child must be non-null.I could do with some help figuring out how to add objects to my screens, as I am trying to prevent having everything in one class.
I am trying to implement a simple chat application in adobe flex 3 with php as back-end. I have found few frameworks on net, AMFPHP and WebOrb. But I see that both these frameworks do a polling to the server at regular intervals.
I am trying to implement Stock Charts in my Mobile application created in flex.what i need to implement is the cross hair as seen in [URL] how this can be achieved.
So I am switching everything over to AS3 from AS2 (finally) and I am stuck with the selected state (when using ROLL_OVER and ROLL_OUT).I did a search and have found a ton of examples for using the timeline and labels to tween the menu states... however I haven't been able to find anything in regards to using a tween engine. I can currently tween the selected state by just doing:
ActionScript Code: addEventListener(MouseEvent.MOUSE_DOWN, onClick); //with the function:
I want to implement tweener effects in my application, but I have a rectangle,
[Code]...
the above code shows my rectangle and two buttons, Intially Accounts Form was selected by default, when i click PersonalDetails button i have to show the screen change effect (From Right to Left that means Personal DetailsForm is moving from right to left ) within that rectangle. Is this possible ?
I am trying to implement a house painting application. I've done it so far that I can draw a shape(creates a movie clip) and fill it with any color. But now I don't know how to "make holes"/transparent areas into a certain movie clip for windows or anything that should not be colored so taht the backgorund will be displayed. [URL]
I don't think it's necessary to load the whole pages, since the header, menu and footer will be the same on every page. Also I want the button of the menu item clicked to stay highlighted while the new content is loaded, thus I want to avoid reloading the menu. And the last demand is for the pages to be linkable (i mean a unique url address for each page). I'm opened to implementing php or java script or any other technology, although i don't really used them before.
I am looking to implement time-stretching in an AS3 Flash application. I have integrated SoundTouch, however, the quality is not fantastic. We do not require the algorithm to be real-time.
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'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'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 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?