[Flashcoders] MVC - ScreenManager
Good morning, Like others before me I would like to really learn MVC by first doing my own as opposed to a framework. This link is very close to what I need to accomplish: http://www.ultrashock.com/index.php/forum/viewthread/80283/ I have put my work in but keep getting block in one way or another, can anyone point me in the direction of this setup in AS3 so I can at least get that part of the plan out of the way (this link is AS2 and it seems any reference to AS3 on this site is a dead end). Any help would be appreciated. Terry Riney ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MVC - ScreenManager
This guys approach sounds a lot like mine. At an airport but I'll try to check out his files Ross P. Sclafani Owner / Creative Director Neuromantic Industries http://www.neuromantic.com http://ross.sclafani.net http://www.twitter.com/rosssclafani 347.204.5714 On Mar 8, 2012, at 9:14 AM, Terry Riney tri...@blueridgetechsolutions.com wrote: Good morning, Like others before me I would like to really learn MVC by first doing my own as opposed to a framework. This link is very close to what I need to accomplish: http://www.ultrashock.com/index.php/forum/viewthread/80283/ I have put my work in but keep getting block in one way or another, can anyone point me in the direction of this setup in AS3 so I can at least get that part of the plan out of the way (this link is AS2 and it seems any reference to AS3 on this site is a dead end). Any help would be appreciated. Terry Riney ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MVC - ScreenManager
On 3/8/2012 9:49 AM, Ross Sclafani wrote: This guys approach sounds a lot like mine. At an airport but I'll try to check out his files Ross P. Sclafani Owner / Creative Director Neuromantic Industries http://www.neuromantic.com http://ross.sclafani.net http://www.twitter.com/rosssclafani 347.204.5714 On Mar 8, 2012, at 9:14 AM, Terry Rineytri...@blueridgetechsolutions.com wrote: Good morning, Like others before me I would like to really learn MVC by first doing my own as opposed to a framework. This link is very close to what I need to accomplish: http://www.ultrashock.com/index.php/forum/viewthread/80283/ I have put my work in but keep getting block in one way or another, can anyone point me in the direction of this setup in AS3 so I can at least get that part of the plan out of the way (this link is AS2 and it seems any reference to AS3 on this site is a dead end). Any help would be appreciated. Terry Riney ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Thanks, Ross. The author uses a Factory Method and I want to create different sets of games each with it's own sound/grid so I was going to substitute an Abstract Factory like this: http://www.as3dp.com/2009/01/actionscript-30-abstract-factory-design-pattern-multiple-products-and-factories/ That is the first change. I will begin transition his code to as3 this afternoon though it takes me a little longer than most so someone may post it before I finish but at least one can see I am attempting to give it a go. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MVC - ScreenManager
On 3/8/2012 11:16 AM, Terry Riney wrote: On 3/8/2012 9:49 AM, Ross Sclafani wrote: This guys approach sounds a lot like mine. At an airport but I'll try to check out his files Ross P. Sclafani Owner / Creative Director Neuromantic Industries http://www.neuromantic.com http://ross.sclafani.net http://www.twitter.com/rosssclafani 347.204.5714 On Mar 8, 2012, at 9:14 AM, Terry Rineytri...@blueridgetechsolutions.com wrote: Good morning, Like others before me I would like to really learn MVC by first doing my own as opposed to a framework. This link is very close to what I need to accomplish: http://www.ultrashock.com/index.php/forum/viewthread/80283/ I have put my work in but keep getting block in one way or another, can anyone point me in the direction of this setup in AS3 so I can at least get that part of the plan out of the way (this link is AS2 and it seems any reference to AS3 on this site is a dead end). Any help would be appreciated. Terry Riney ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Thanks, Ross. The author uses a Factory Method and I want to create different sets of games each with it's own sound/grid so I was going to substitute an Abstract Factory like this: http://www.as3dp.com/2009/01/actionscript-30-abstract-factory-design-pattern-multiple-products-and-factories/ That is the first change. I will begin transition his code to as3 this afternoon though it takes me a little longer than most so someone may post it before I finish but at least one can see I am attempting to give it a go. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders I suppose everyone has their own project structure, thought I would just use default package. Hopefully this thread will generate the interest the other mvc threads have and others will begin to agree on one: package { public class GameUpdate { public var state:String; public var images:Array; public var img_index:Number; public var title:String; public var percent:Number; public function GameUpdate(state:String, images:Array, img_index:Number, title:String, percent:Number) { this.state = state; this.images = images; this.img_index = img_index; this.title = title; this.percent = percent; } } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MVC - ScreenManager
On 3/8/2012 11:38 AM, Terry Riney wrote: On 3/8/2012 11:16 AM, Terry Riney wrote: On 3/8/2012 9:49 AM, Ross Sclafani wrote: This guys approach sounds a lot like mine. At an airport but I'll try to check out his files Ross P. Sclafani Owner / Creative Director Neuromantic Industries http://www.neuromantic.com http://ross.sclafani.net http://www.twitter.com/rosssclafani 347.204.5714 On Mar 8, 2012, at 9:14 AM, Terry Rineytri...@blueridgetechsolutions.com wrote: Good morning, Like others before me I would like to really learn MVC by first doing my own as opposed to a framework. This link is very close to what I need to accomplish: http://www.ultrashock.com/index.php/forum/viewthread/80283/ I have put my work in but keep getting block in one way or another, can anyone point me in the direction of this setup in AS3 so I can at least get that part of the plan out of the way (this link is AS2 and it seems any reference to AS3 on this site is a dead end). Any help would be appreciated. Terry Riney ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Thanks, Ross. The author uses a Factory Method and I want to create different sets of games each with it's own sound/grid so I was going to substitute an Abstract Factory like this: http://www.as3dp.com/2009/01/actionscript-30-abstract-factory-design-pattern-multiple-products-and-factories/ That is the first change. I will begin transition his code to as3 this afternoon though it takes me a little longer than most so someone may post it before I finish but at least one can see I am attempting to give it a go. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders I suppose everyone has their own project structure, thought I would just use default package. Hopefully this thread will generate the interest the other mvc threads have and others will begin to agree on one: package { public class GameUpdate { public var state:String; public var images:Array; public var img_index:Number; public var title:String; public var percent:Number; public function GameUpdate(state:String, images:Array, img_index:Number, title:String, percent:Number) { this.state = state; this.images = images; this.img_index = img_index; this.title = title; this.percent = percent; } } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Would like to pass a score/time/damage to client will stick with score/damage right now: package observer{ import observer.Observer; /** * A Java-style Observable class used to represent the subject * of the Observer design pattern. Observers must implement the Observer * interface, and register to observe the subject via addObserver(). */ public class Observable { // A list of observers. private var observers:Array; /** * Constructor function. */ public function Observable() { observers = new Array(); } /** * Adds an observer to the list of observers. * @param o The observer to be added. */ public function addObserver(o:Observer):Boolean { // Can't add a null observer. if (o == null) { return false; } // Don't add an observer more than once. for (var i:Number = 0; i observers.length; i++) { if (observers[i] == o) { // The observer is already observing, so quit. return false; } } // Put the observer into the list. observers.push(o); return true; } /** * Removes an observer from the list of observers. * @param o The observer to remove. */ public function removeObserver(o:Observer):Boolean { // Find and remove the observer. var len:Number = observers.length; for (var i:Number = 0; i len; i++) { if (observers[i] == o) { observers.splice(i, 1); return true; } } return false; } /** * Tell all observers that the subject has changed. * @param infoObj An object containing arbitrary data to pass to observers. */
Re: [Flashcoders] MVC - ScreenManager
On 3/8/2012 11:47 AM, Terry Riney wrote: On 3/8/2012 11:38 AM, Terry Riney wrote: On 3/8/2012 11:16 AM, Terry Riney wrote: On 3/8/2012 9:49 AM, Ross Sclafani wrote: This guys approach sounds a lot like mine. At an airport but I'll try to check out his files Ross P. Sclafani Owner / Creative Director Neuromantic Industries http://www.neuromantic.com http://ross.sclafani.net http://www.twitter.com/rosssclafani 347.204.5714 On Mar 8, 2012, at 9:14 AM, Terry Rineytri...@blueridgetechsolutions.com wrote: Good morning, Like others before me I would like to really learn MVC by first doing my own as opposed to a framework. This link is very close to what I need to accomplish: http://www.ultrashock.com/index.php/forum/viewthread/80283/ I have put my work in but keep getting block in one way or another, can anyone point me in the direction of this setup in AS3 so I can at least get that part of the plan out of the way (this link is AS2 and it seems any reference to AS3 on this site is a dead end). Any help would be appreciated. Terry Riney ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Thanks, Ross. The author uses a Factory Method and I want to create different sets of games each with it's own sound/grid so I was going to substitute an Abstract Factory like this: http://www.as3dp.com/2009/01/actionscript-30-abstract-factory-design-pattern-multiple-products-and-factories/ That is the first change. I will begin transition his code to as3 this afternoon though it takes me a little longer than most so someone may post it before I finish but at least one can see I am attempting to give it a go. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders I suppose everyone has their own project structure, thought I would just use default package. Hopefully this thread will generate the interest the other mvc threads have and others will begin to agree on one: package { public class GameUpdate { public var state:String; public var images:Array; public var img_index:Number; public var title:String; public var percent:Number; public function GameUpdate(state:String, images:Array, img_index:Number, title:String, percent:Number) { this.state = state; this.images = images; this.img_index = img_index; this.title = title; this.percent = percent; } } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Would like to pass a score/time/damage to client will stick with score/damage right now: package observer{ import observer.Observer; /** * A Java-style Observable class used to represent the subject * of the Observer design pattern. Observers must implement the Observer * interface, and register to observe the subject via addObserver(). */ public class Observable { // A list of observers. private var observers:Array; /** * Constructor function. */ public function Observable() { observers = new Array(); } /** * Adds an observer to the list of observers. * @param o The observer to be added. */ public function addObserver(o:Observer):Boolean { // Can't add a null observer. if (o == null) { return false; } // Don't add an observer more than once. for (var i:Number = 0; i observers.length; i++) { if (observers[i] == o) { // The observer is already observing, so quit. return false; } } // Put the observer into the list. observers.push(o); return true; } /** * Removes an observer from the list of observers. * @param o The observer to remove. */ public function removeObserver(o:Observer):Boolean { // Find and remove the observer. var len:Number = observers.length; for (var i:Number = 0; i len; i++) { if (observers[i] == o) { observers.splice(i, 1); return true; } } return false; } /** * Tell all observers that the subject has changed. * @param infoObj An object containing arbitrary data to
Re: [Flashcoders] MVC - ScreenManager
Terry Riney skriver: Would like to pass a score/time/damage to client will stick with score/damage right now: package observer{ import observer.Observer; /** * A Java-style Observable class used to represent the subject * of the Observer design pattern. Observers must implement the Observer * interface, and register to observe the subject via addObserver(). */ Congratulations on reinventing the EventDispatcher class. I hope you had fun reinventing the wheel. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MVC - ScreenManager
On 3/8/2012 12:42 PM, Henrik Andersson wrote: Terry Riney skriver: Would like to pass a score/time/damage to client will stick with score/damage right now: package observer{ import observer.Observer; /** * A Java-style Observable class used to represent the subject * of the Observer design pattern. Observers must implement the Observer * interface, and register to observe the subject via addObserver(). */ Congratulations on reinventing the EventDispatcher class. I hope you had fun reinventing the wheel. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders I will be writing code in other languages. As my first post said this is for my use. If I start changing things and someone follows this post it will be difficult to follow along. You comments are noted if a little on the strident side. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Should I use BlazeDS for this?
I have a flash project that polls a php server every 10 seconds to check for commands. I have 1200 machines running this on a local network. When we have network slowdowns, polling sometimes fails and the project hangs. Is Blaze/LiveCycle well behaved on thin networks? Is it more robust than polling under these conditions? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MVC - ScreenManager
If you can't take the Henrik, get out of the kitchen.. lol On Mar 8, 2012, at 11:53 AM, Terry Riney wrote: On 3/8/2012 12:42 PM, Henrik Andersson wrote: Terry Riney skriver: Would like to pass a score/time/damage to client will stick with score/damage right now: package observer{ import observer.Observer; /** * A Java-style Observable class used to represent the subject * of the Observer design pattern. Observers must implement the Observer * interface, and register to observe the subject via addObserver(). */ Congratulations on reinventing the EventDispatcher class. I hope you had fun reinventing the wheel. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders I will be writing code in other languages. As my first post said this is for my use. If I start changing things and someone follows this post it will be difficult to follow along. You comments are noted if a little on the strident side. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders