Actionscript 3 :: Design Pattern For Multiple View States?

May 27, 2011

I have an application that takes the user through a set of steps, configuring a product, say about 10+ screens. With options to go back, skip to a certain point etc. I need to fade between these steps, and also have language switches available at any point.

I was thinking of using an MVC style pattern, having a master view that accepts a 'next view' and fades it in, removing the old.

It feels bloated to have 10+ separate view classes, using similar components for this task, so was wondering what other approaches there are that I should look into? or one that is suited for this kind of application

View 2 Replies


Similar Posts:


Actionscript 3 :: Design Pattern To Require Multiple Events Before Executing Method?

Aug 23, 2011

There are many times that I've needed to execute some code after a number of events have fired, and I've come up with counters and such but I feel there must be a better way.For example, say five files need to be loaded, after which a UI component will become active.If I set up a counter that increments each time a file is requested, then decrements each time one has loaded, I run the risk that the first two or three files may somehow get completely loaded before my code gets around to requesting the fourth and fifth, which would mean that my counter would be at zero when I still have two files to load, thus allowing the UI component to be prematurely activated.

There are some cases where you could know the number that need to be loaded before the requests go out, but it's possible that the first file contains the paths (and therefore the number of) files.And this file-loading scenario is only an example of the pattern I'm trying to explain.)

View 4 Replies

Flex :: Presentation Model Pattern Can View Specific Logic Reside In View?

Aug 15, 2011

I'm currently using RobotLegs with the Presentation Model pattern to develop a Flex 4 project. I understand that all business logic related to a View resides in the Presentation Model associated with that view, however, I am confused when it comes to View specific logic.For example, I have an indicator that needs to be positioned relatively to list items depending on which list item is selected. Is it acceptable in the Presentation pattern to put the logic that will position the indicator in the View and simply have that logic run in reaction to a selectedIndex property changing in the presentation model?The reason I am considering this is that since the Presentation Model does not have a reference to the view it is difficult to come up with an ideal solution for manipulating view components.

View 1 Replies

Flash - Best Design Pattern For RTS Game In AS3?

Jul 3, 2011

I'm looking to get some good books on design patterns and I'm wondering what particular pattern you'd recommend for a Realtime Strategy Game (like Starcraft), MVC?. I'd like to make a basic RTS in Flash at some point and I want to start studying the best pattern for this.

View 3 Replies

Flash TweenLite Design Pattern

Oct 3, 2011

Just curious. TweenLite/TweenMax is a very common animation library, and I was wondering how someone would classify the design pattern used in TweenLite.For those of you unfamiliar, here's some example code from their website:[code]

View 1 Replies

ActionScript 2.0 :: Using Singleton Design Pattern?

Feb 19, 2007

a little foggy on passing variables to the Constructor from a Singleton instance. Could someone enlighten?

From timeline:

Code:
var c:Calculator = Calculator.getInstance(5,20,30);

[Code]...

View 1 Replies

Actionscript :: Object Pool Design Pattern?

Nov 22, 2010

Can anyone show an example of the object pool design pattern, as written with Actionscript 3.0?

View 1 Replies

Flex :: Implementation Of Value Object Design Pattern?

Jun 20, 2011

I am just looking design patterns used in Flex. Any value object design pattern and how is it implemented in Flex.

View 3 Replies

ActionScript 3.0 :: Design Pattern For SWFAddress Integration?

Oct 15, 2010

I haven't found the best process is integrating SWFAddress. I've used it on just about every project since it came out, but I rarely have something reusable, and integrating SWFAddress is one of the more time/thought intensive tasks in the dev of a project.

View 5 Replies

ActionScript 3.0 :: Design Pattern To Apply To A Website?

Jun 22, 2011

I'm just beginning to wrap my head around design patterns. I'm in the process of rebuilding a slideshow using MVC and it's coming along nicely. I'm considering using a design pattern for the whole site and am wondering if there are certain patterns that people usually apply to sites.

View 4 Replies

ActionScript 3.0 :: Full Browser Error With Design Pattern?

Sep 17, 2010

I'm updating a photo gallery site I did a while back to be full browser and with classesI produced this demo to work out the full browser elementsI did this with a Document Class and everything seems to be working as expected.For the updated version of the site I'm using a Model View Controller design pattern and I'm trying in implement the full browser in the View ClassTypeError: Error #1009 : Cannot access a property or method of a null object reference.I would have excepted more form this forum but I can't post any code here or even paste the text - very poor.

View 1 Replies

ActionScript 3 :: Flash Game Inventory - Design Pattern

Aug 23, 2011

I'm still studying OOP designs, so what's the best way to achieve an inventory for a simple flash game? It seems that more than one design pattern could deliver some kind of an inventory but I would lose the flexibility if I try to adapt it somehow without a good knowledge about the subject. For money to buy what is available in an inventory I thought of Singleton. If there's enough cash earned while playing the game, then one can buy new skills. Maybe decorator pattern could list many thumbnails as buttons, and clicking on it applies new features and skills to the character.

View 1 Replies

ActionScript 3.0 :: Static Class Can't Replace Singleton Design Pattern

Jan 1, 2010

I am not able to understand, why a static class cannot replace a Singleton design pattern .

Cannot a static class, can be used to ensure, the class is never/once only, instantiated. Because that is the facility "static" key words provide , however it doesnot allow instantiation, but that is much similar to the limitation of instantiation once only.

View 9 Replies

Actionscript 3 :: Use Flash Event System Or Build Own Observer Design Pattern?

Dec 20, 2010

In this cookbook someone advocates to build own Observer Design Pattern: [URL]

Is it really faster as for performance ?

View 2 Replies

Flex :: Changing View States On Application Resize?

Aug 6, 2009

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:

this.addEventListener(ResizeEvent.RESIZE, SizeChanged);

I want this to work within the browser. I even tried using fixed dimensions in the embed code, instead of percentages, but that didn't help either.

View 1 Replies

Flex :: View States Used In Real-World Projects?

Sep 3, 2009

I've just found out about View States in Flex (v3.0), but I am not really sure how widely this is used in real-world applications. Is it a good practice to use it? Are there any pitfalls such as maintainability for instance?

View 3 Replies

Flex :: Changing View States - Making Group Incurrent State

Sep 26, 2011

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.

[Code]....

View 1 Replies

Java :: Hibernate And Servlets With Adobe Flex + Model View Controller Pattern?

Aug 30, 2010

I am preparing a document for a project. The project's backend is developed in Java, frontend is adobe flex.
I am not sure about the correct way of describe the project in Model-View-Controller way.

For Model layer: Using Hibernate Java beans to implement all the business logic and persistence? For View Layer: Using Adobe flex send post or get request to Controller layer, and get respond in XML format. For Controller Layer: Using Java servlet to handle requests from Flex client?

View 2 Replies

ActionScript 3.0 :: Pass Stage Reference To An Object Placed In Design View?

Nov 28, 2010

In a game me and a friend is creating, the levels are stored in MCs.In the level MCs there are several other MCs that the player should be able to interact with.

This means the objects in the levels need a stage reference.I can place all the objects manually and pass the stage ref in the constructor of the object's class, but this is a pain when the levels are going to be pretty big.

Is it possible to make sure that flash always passes a stage ref to the object even though it's not placed there by code?

View 1 Replies

ActionScript 3.0 :: Passing A Stage Reference To An Object Placed In The Design View?

Nov 28, 2010

In a game me and a friend are creating, the levels are stored in MCs. In the level MCs there are several other MCs that the player should be able to interact with.

This means the objects in the levels need a stage reference. I can place all the objects manually and pass the stage ref in the constructor of the object's class, but this is a pain when the levels are going to be pretty big.

Is it possible to make sure that flash always passes a stage ref to the object even though it's not placed there by code?

View 1 Replies

Actionscript 3 :: Custom Flex Component, Visual Controls In Design View?

Apr 1, 2010

Do you know how if you drag an <mx:Label> or <s:Label> component into your Flex project, when you go to design mode you get this panel on the right to set its properties like text etc.

I have a custom component that I can call with actionscript, or with mxml like this:

<comps:TheComp field1="OK" field2="Yes" />

The component takes this input and uses it for its internal operation

[Code]...

When I go to design mode, I can see the component under custom components, I can drag it to the stage and see it, but can't set its values field1 and field visually on the right like a normal <s:Label> or <mx:Label> would have. how I can add that? Do I need to make it inherit something or anything else

View 3 Replies

Flash :: Flex - What Are Possible Non-code-related Reasons For A Blank Screen In Builder 4.6 Design View?

Dec 13, 2011

I was editing a very basic mobile Flex project, and after I debugged the master (application) mxml file, Design View stopped working (blank screen displayed, no Design View errors) for all files. Creating new projects, either mobile or else, or testing old, working projects, doesn't work either. Out of the related issues I've found info on, most concern earlier versions of the IDE, and deal with either Design View errors (got none), use of certain functions or custom components (I get the error even on a new project), or are solved by changing styles back-and-forth (tried already, to no avail).

I can't drag and drop components to the design area, either (a "prohibited" symbol appears and nothing happens when I drop); so I'm pretty sure it's not code-related or a bug, but probably something stupid, like a configuration issue, so I definitely need someone to take a fresh look at it.

View 1 Replies

ActionScript 3.0 :: Mysql Database Design = Multiple Students + Multiple Results

Feb 9, 2011

This is more of a database design issue but almost everybody here uses database integration with their apps so I feel it is important. I am integrating AS3 + mysql + php and need to clear up the database design for multiple students results in various activities. Developing an online e-learning course with a "dashboard" or teacher control panel with all kids results in each activity. I have read the database design rules by Codd etc... understand the need for parent and child tables so information is relational and not duplicated etc... BUT I am not sure how to design the results part. Various students do various lessons with 10 activities which each give a mark out of ten. The table would be updating every few seconds as 10,000 users would be online at the same time

1. Would I create a results table with all the students results going in the same table ie: Tom would be the first row

[Code]....

View 5 Replies

Flex :: Flash Builder 4 Design View Vs Flash Runtime Appearance W/SDK 4.1?

Jan 22, 2011

Flash Builder's design view is worse than 3's (which at least was usable if you ignore some quirks), so WHAT do Flex UI designers (those who don't have paid design teams...) do to design a complex UI? Because Design View (also based on what a lot of people say about it..) gets more useless with every release.See image for some differences in design view vs.Flash. WHAT is causing this? css also posted..("Duration", "hr", "min" are mx Labels, the image size text is an mx Text comp.Project is an "mx only" SDK 4.1 project.) I don't even care that the spinners look different, I just need it to show me correctly sized stuff so I can position things via Canvas, or properly size containers.

mx|Label {
font-weight:bold;
font-size:12;[code].....

View 1 Replies

Flash :: Builder 4 "includeIn" Property Causing Design View Error

Apr 26, 2010

I am creating a custom TextInput component that will define an "error" state. I have extended the TextInput class to change the state to "error" if the errorString property's length is greater than 0. In the skin class, I have defined an "error" state, and added some logic to detect the size and position of the error icon. However, if I have this code at the same time I use the "includeIn" property in the bitmap image tag, I get a design view error. If I either A) Only include that code with no "includeIn" property set, it works or B) dont include the code to set the icon size and position and only use the "includeIn" property, it works. Any ideas what could be causing the design view problem when I use both the "includeIn" property and the icon size/position code at the same time?

[Code]...

View 1 Replies

Php :: Multiple Calls To Amfphp Using Singleton Pattern On Netconnection?

Feb 23, 2012

I'm trying to call AMFPHP two times on a single ActionScript method and what happen is that only the first call succeed. The second one doesn't return an error, doesn't alertsanything, it is more likely that it doesn't even happens and I'm not sure why.Here is an example:

public function editSomething():void{
if(dgChild.selectedIndex == -1){
Alert.show("You need to select a register in order to edit it.");

[code].....

View 1 Replies

ActionScript 2.0 :: Applying Wave Pattern To Multiple MovieClips

Apr 4, 2011

I made an mc which on being hovered makes a wave. The problem is that I can't think how to apply the code on about 15 mc's. I used the main timeline for coding purpose. Now I want to apply the same waving pattern to the other 14 mc's. I tried the for loop but couldn't get it to work because of the variables involved.

Here's my code-
k = 100;
t = 0;
ascend = true;
waver = false;
waving = false;
[Code] .....

View 2 Replies

Flex :: Edit Multiple States At Once In Flash Builder 4?

Oct 12, 2009

While in Design mode in Flash Builder 4 (gumbo, beta 2), is it possible to edit multiple states at once? In the "states" window, it would seem like I should be able to shift-select multiple states so changes made will affect all the selected states, and if all are selected it will not add the state selector to the property in the mxml tag. No?

View 2 Replies

Flex :: Assign Multiple States As Base For Another State?

Nov 29, 2009

Is it possible, in flex, to assign multiple states as base for another state? Say I have state "stateA" that adds a button "buttonA" and state "stateB" that adds a button "buttonB". Is it possible to create a state "stateC" that is based on state "stateA" and "stateB"? If not, is there a workaround to accomplish that? Also notice that the button IDs should be "buttonA" and "buttonB" and I can't have several buttons in different states with the same ID ... Here is an example of what I want:

[Code]...

View 1 Replies

ActionScript 3.0 :: Search A String For A Particular Pattern, And Replace It With Elements From Within The Pattern?

Nov 25, 2009

i'm trying to search a string for a particular pattern, and replace it with elements from within the pattern... for example..here's the given string...if you want to learn how to use regexp, {url===http://somesite.com, text===click here}.

the pattern...
{url===http://somesite.com, text===replacement text}

and the intended result...
if you want to learn how to use regexp, click here.

of course, i'll extract the url and do something else with it... i'm just wondering what the regexp is for that pattern, and how i can extract things from the results returned.

View 5 Replies







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