Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Existing Project Development (http://www.programmingforums.org/forum51.html)
-   -   How should I tackle this problem (Flash / Action Script)? (http://www.programmingforums.org/showthread.php?t=12202)

TCStyle Dec 17th, 2006 8:58 PM

How should I tackle this problem (Flash / Action Script)?
 
I'm coding a small application in Flash and I don't know exactly how I should organize it. For all of those of you who are familiar with Action Script I'll scarcely go over the details of the projects.

The project will consist only of one frame, with all the Action Script residing in that one frame. There isn't going to be any graphics on the stage, so I'm creating the U.I. class objects, positioning them, and working with them only through code.

The application is going to have several different financial calculators inside (ones that determine annuity, compound / interest, mortgage dues, retirement savings, ect), and each calculator is going to have it's own "page", so to speak. The user will use built-in U.I. MenuBar component (flash mx pro 2004) to navigate to whichever calculator he wants. Once he clicks the menu item, I want it to take him to the "page" where that specific calculator is on. Now, like I said, I can only have one frame in the entire document.

My solution: I was thinking about making each calculator it's own function. Inside these functions I will create the class objects for all the components I need to use, position them, and then make nested functions that find the calculations. These functions will be called upon whenever the user picks a calculator from the MenuBar, and will be replaced by another whenever he/she picks a new one. I'm a little skeptical because this isn't really the traditional use of a function. What do you guys think of the approach? I was recommended by some to make a separate class for each calculator, but others told me the function idea was better.

help is appreciated


All times are GMT -5. The time now is 1:25 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC