I am trying to update some code and initially it used #include to put a bunch of standard code on the main timeline. While rewriting everything is it a better idea to try to encapsulate things into more relevant objects? For example- There is a video player on the stage and the include adds a set of functions on the main timeline to control that video player. I'm thinking that this is kind of a messy way to go about it but I'm also thinking that pragmatically speaking pulling those functions from the main timeline into a VideoManager class and its methods will mean chasing down every place in the code where a general videoPlay() function is called to change it to "videoManager.play()" I've used a Singleton for the VideoManager which I subsequently put on the global scope so that a button in any scope can call myVideoManager.play() Am I headed in the right direction by trying to pull these into classes and methods? Am I taking a step backwards by placing them in a global timeline so that people don't have to write videoManager=VideoManager.getInstance() everytime they want to call its methods?
I feel as if I'm making good progress with this but it's the first time that I've worked on something of this scope and I would love to hear from some experienced people about the validity of my decisions. Mani _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders