View Full Version : Looking for an expert to proofread and advise me on a new project...
10-26-2005, 11:29 AM
Hey again guys...
I just started a new, actionscript-intensive project. I had previously made a program for my employer (an educational children's game used to teach history via postage stamps), that was largely layer-based.
One of my employers asked if it was possible for me to convert it over into a more suitable environment for the open source community so that it can be redistributed and edited for use in other areas (think baseball trivia games, trading cards, screenshots, etc.). Obviously layer-based ActionScript and a ton of clips on the stage aren't the most user friendly in terms of finding what it is you want to do. Not to mention that this was my pet project that I used to help teach myself Flash. It wasn't very cleanly done, to say the least.
I told him it'd be a great challenge for me, but that I was up to it. So I set out to build some of my first AS classes, and so far I've gotten a bit done using only actionscript!
Needless to say, I'm really happy with myself, for something that I'm sure some of you would take no less than 5 minutes to do!
What I'd really like is for someone who has some time to take a look at what I've done so far, and perhaps edit or comment areas of my code/classes that could use improvement. I've also got a few bugs in my program that I'd like to get fixed and would generally just like someone to take a look at how I'm structuring things, and tell me if it's logical at all.
I'd prefer not to just post a FLA on here, as (for now) it still falls under "work for hire" and I don't want to get into any trouble with them for accidentally distributing it before it's finished.
If anyone feels up to it, I'd really love some one-on-one help or expert guidance. I'm definitely a novice, but I love seeing it come together! I'm not asking anyone to do it for me... just to take a look at my current FLA, my Classes, and my SWF, and tell me what needs work, or even make some "housekeeping" changes if they see fit.
If you're interested, I'll be happy to include you in the "credits" for the finished project (which is hopefully going to be distributed to gradeschools in Arizona by Wells Fargo).
Please respond here or via PM if you'd be willing to lend me a hand. I'd really appreciate any help I could get!
Also - I'm now newly-upgraded to Flash 8!
10-26-2005, 03:05 PM
Howdy and Welcome... :)
I'd prefer not to just post a FLA on here, as (for now) it still falls under "work for hire" and I don't want to get into any trouble with them for accidentally distributing it before it's finished.
I don't really see any problem here... You are sure that you want other people take a look at the script so that you can basically collaborate with other developers to create better project, right???
As long as you are sure that you are not using it to get the job done, there's got to be lots of people who'd like to help you out and you can use this forum for that specific reason...
If you are worried about distributing unfinished portion of script, just put the disclaimer on the TOS saying that nobody can use this one for their own project and remove that when you are sure it reached the stage... That's my 2 cents... ;)
My concern is that not many people are still using FMX 2004, so you are limiting your user base abit but it will get better as time goes by...
Just to let you know, the site admin was thinking of creating something similar to the SourceForge for the Flash projects and this will be the good candidate for it... They are working on the site upgrade at the moment, so the timing might not be the best, but it sure is a good candidate... ;)
10-27-2005, 02:48 AM
Thanks for the words of wisdom! I'll go ahead and .zip up my project and attach it for people to take a look at. Please go easy on me, as I'm still a beginner with OOP, and very much a beginner with AS.
I'd love for someone to take a sledgehammer to all of my source and Classes, and, like one of those reality makeover shows, return it to me all spick-n'-span! If that's asking too much, I'd appreciate pointers or tips just as much :)
Here's a general description of the project (remember, this is intended for 3rd and 4th graders, mostly):
The user gets a login screen, where they enter their name. I made a pretty basic word filter class to accompany this, should a teacher want to filter out certain words that could be used in the names.
The user logs in, and then a log out button should be displayed.
After logging in, I want to make a transition similar to the one seen at http://www.framebox.de/, although this really isn't my top priority at the moment. I'm hoping to eventually include several different transitions that the teacher or user will be able to choose from.
After the "page transition", I will have a group of images, arranged in rows and spaced evenly in the middle of the screen. Each image and its data will be loaded via an XML file. Clicking on 1 image will take you to a listing of sub-categories associated with that image.
Example: A page full of postage stamp images. One stamp, of a Native American, would take you to a page of similar stamps dealing with Native Americans. Another stamp with Dinosaurs would take you to a page of similar stamps that deal with prehistoric life.
Each of the subsequent "sub categories" will have a specific game type. Multiple Choice, True/False, Word Search, Crossword, Word Scramble.
Completing each game will return a score to the player, and the game will keep track of how many games the user has played, how many games they have left to play, what their overall score is, and the option to print out a progress report/grade sheet for their teacher.
I've created a few Classes already, which will be included with the project I'm attaching. I'm sure they're ridiculously inefficient and poorly managed. I'm also sure that I'm going about calling them and using them in all the wrong ways.
You'll notice right off the bat that if you "log in" and then "log out", things go haywire and the login for isn't displayed again. It's with respect to things like this that I could really use the most help.
I'm trying to keep this as Class-based as possible, to allow people to edit it more-easily. Of course there will have to be some layer-based AS, too, but I'd like to be that as simple and effortless as possible to navigate through and find what you're looking for.
So feel free to doctor my code, and do what you think would make it look or function better. I'd appreciate it if you wouldn't redistribute it, but at the same time, I, like all of you, need to start learning somewhere. Any constructive criticisms will be greatly appreciated!
Thanks for your help, AS.org!
Below is my Project, including all of my classes, and the .fla. Along with an images directory which I'll be using to create the various categories, and the XML file I've made (not 100% finished) containing the various category names, questions, and content.
If anyone would like to see the semi-complete version of the program that I had previously been working on using layer-based AS, just PM me and I'll send it your way so you can get a better idea of what I'm going for. It's definitely a work in progress, but it's far more complete than my newer version.
Zip of the Project (http://www.x-head.com/PHFGame.zip)
10-27-2005, 03:35 AM
Thanks... I won't be able to be of much help if this is F8 project but I'll be spreading the word for you... ;)
10-27-2005, 09:05 AM
Thanks for your interest and your support!
It started at in Flash MX 2004 Pro, but since I upgraded to Flash 8, it automatically converted it to the new format. As far as I can tell though, the code is the same, as I haven't really used any Flash 8 specific functions or anything (yet)
I still have Flash MX 04 installed, so I could just transfer all of the code back over to it, and hope for a little more support.... I don't know if that's worth it though.
Anyways, thanks again! Anyone else that's interested in helping out, I'd really appreciate it!
10-27-2005, 12:52 PM
I'll take a look. I'll do what I can in what spare time I can find.
10-27-2005, 02:43 PM
Here are some initial thoughts after a quick peek at your code...
I don't think I would make login extend (inherit from) word filter. When designing an application, you want to think about how the classes are related to each other. In general, you use inheritance when one class is a type of another... like a bear is a type of animal. I would not say a login is a type of word filter.. I would say a login HAS a word filter or maybe USES a word filter. So I would probably incorporate a word filter by composition, or just have the login call a seperate instance of a word filter to take care of that part of the functionality.
You will probably want a better approach to handling transitions. What you have now will be hard to manage and is dependant on hard coded movie size. You might consider building on to what MM already provides. Check out the code at the following location...
Flash 8 installation folder\en\First Run\Classes\mx\transitions
Doing a project is a great way to learn, but I find that some book reading at the same time is almost as valuable. For you I would suggest something on basic OO principles and the OO way of thinking, something like this...
And then of couse everyone doing this sort of thing should read this one...
10-27-2005, 05:07 PM
Thanks for the advice! I've been meaning to get a book, but haven't really known what to get, and was afraid that I might end up shelling out money for things that I might be able to find just as easily on AS.org or in the livedocs. I'm taking a class in Java at the moment, which definitely is OOP, and I'm sure getting some additional reference material would help me both with this project and my class.
good advice :)
 and thanks for pointing me to the transitions. never knew those were there, that should be really helpful!
10-27-2005, 11:31 PM
I had kind of a general structure question i wanted to ask, but forgot to.
In general when you guys are writing your own classes, do you leave it to the classes themselves to populate the stage, or do you primarily just use Classes to process data and whatnot.
I was thinking maybe I could populate my stage via the frames and layers, and then when actually processing data, i could call some of my classes.
I think my big issue right now is being able to "start over." In the sense that on Frame 1 of the movie, I want it to display a login screen. When the user logs in, it takes them to frame 2. When they log out, I want it to go back to frame 1 and the log in screen - unfortunately as I have it right now, things get really screwy when I try to do that, and I'm not sure why.
Anyways, was just kinda curious how you guys would attempt to structure something like this so it would be efficient, but also customizable in the long run. Thanks for your input so far!
10-30-2005, 06:03 PM
Its really a matter of personal preference. But it is quite common to have each frame represent a different state or "page" of the application as you have described.
11-01-2005, 07:20 AM
Your advice seems to help the flow of this project a bit, sleek, so thank you, for what it's worth :)
I ended up revising things a bit, and (at least in my opinion), I've made a few good classes, that (hopefully) won't need a lot of modification to serve their purpose for the rest of the game/program.
Right now my big issue is getting a Log-in/Log-out system working. I want the user to be able to log-in (I'll create a User Class to store the info), and then also log-out, thus deleting all of that user's info.
The problem for me arises during the log-out phase. I thought it would make things very easy if I just put all of the movie clips and data into a conatiner movie clip (aptly named "container"), and then when the log-out button is pushed, just remove the container clip from the movie, and go back to frame 1 of the _root timeline.
Sadly, this didn't work nearly as well as I had hoped, and I'm really out of ideas.
I've revised my FLA and I'm including a link to it so someone can maybe take a look, time permitting, and give me a hand with it.
I've gotten up to the point where I'm loading the images for each "category" and placing them onto the stage. I hit a bottleneck when trying to think of a good algorithm for positioning them evenly on teh stage, so I decided to switch gears and focus on the log-in/log-out part of things (it's probably a good idea to get that done before moving on with the rest of the game).
I'd appreciate it if anyone could take a look and make adjustments or recommendations in terms of efficiency or functionality. I think most of it's self-explanatory, and I tried to structure the project for best-clarity (all MC's are in labeled folders in the library, and the Classes are documented as best as I could).
The updated zip can be found here: http://www.x-head.com/PHFGame.zip
Thanks for your continuing patience and help :cool:
11-01-2005, 08:55 AM
I can't open your .fla (I assume that's because I have MX2004 and you published in F8) so I couldn't look at your login/out code, but here are a couple of demos to give you some ideas.
In demo2, the assets for each screen (login, game) occupy different frames, and the login/out buttons send you to the appropriate frame.
In demo3, there's only one frame and the screens are made by showing/hiding the appropriate assets.
There are pros and cons to both and my own apps often end up being a combination of the two. Your idea with the container movie works in principal; you probably just got some details wrong. Instead of removing the container, you could make it invisible. Then you don't have to reload everything the next time someone logs in (assuming the next login happens before your app is restarted/reloaded)
11-01-2005, 09:38 PM
Thanks a ton, silverfish, I'll have a look at it right now.
Yeah, I recently upgraded to Flash 8 and although technically I don't think I'm using anything in my FLA from 8 yet, I published it in 8 anyways. I was hoping to take advantage of the new transition classes.
if i can, i'll try to publish it at MX 04 and see if it works (up to the point where i start using the transitions, of course)
11-02-2005, 03:28 AM
Since I"m an indecisive fool, I tried to start over, in the hopes of making things work this time. I ended up liking my new layout a lot better than my old one, but I'm still having Login/Logout woes.
For everyone else's convenience, I've commented out the DropShadows I was using (they were the only Flash 8 parts of it), and published it for Flash 7.
I think my big issue is that on my "login" frame, I'm attaching my login form dynamically. So when I log out and go back to the login frame, it attaches it AGAIN.
To solve this, I was thinking I'd just use unloadMovie to remove all of the movie clips, and then just reload them every time the user gets to the login frame. For some reason this doesn't work. You should be able to see it in the frame labeled "loginScreen"
Either way, I'm still pretty stuck, but at least I found a layout that I like :)
Have a look at it if you can, the new ZIP of my project is up again (at the same URL)
Thanks again everyone
11-03-2005, 03:28 AM
I tinkered with it for a bit, getting rid of some stuff, and adding some new stuff, and ended up getting things to work out in the end. Thanks for the help, silverfish.
I'm not really 100% sure what I did to get things to work, but what I'm doing now is putting all of my dynamic stuff into 1 MC, and leaving all of my constant stuff in another. When the user logs out, I remove the dynamic MC and everything in it. When they log in, it's all recreated again.
It seems to be working pretty well, and I finally got to a point where I can start messing around with the tweening and transition classes.
I'm going to publish in Flash 8 again, since that's what I need for all that cool jazz, but thanks for your help anyways :) I'll get an updated version of it, for anyone who's interested, uploaded tonight or tomorrow with my current progress.
11-03-2005, 07:08 AM
re help: you're welcome :-) doesn't feel like I've done all that much.
Well done getting it working, and sorry I didn't have a chance to look at your MX2004 version (I have a plane to catch tomorrow and the usual million things to do beforehand). Your basic plan of separating dynamic and static content sounds good to me.
11-11-2005, 10:57 PM
Thanks again for everyone's input so far. I've gotten things working just about how I want them to so far. I have 1 new general questions that I wanted to ask:
This "game" will consist of many loaded images (loaded using loadClip()). If there are 6 images per "screen," what would be the more logical option.
a.) Create 6 "container MC's", and then every time I want to display 6 new pictures, just load the 6 new picture sinto the already-created MC's? (This would mean the user would have to download the images every time, as they wouldn't be saved when the user went to view the next set of images.
b.) Create an MC for each loaded image and simply make them _visible when needed and invisible when not needed, or moving them off the screen. There's technically no limit to the amount of images that a game can contain, and they can range into the hundreds in most cases. Would this create a performance hit, if I had a whole bunch of inactive image MC's made to be invisible or just off the stage?
I'd like to find some sort of middle-ground. This is mostly a standalone application (using a projector), but I also want to have a swf version to allow it to be played in a browser, and needless to say, having to download the images every single time you go to a different section of the game is a pain in the ass, especially for dial-up users. Any thoughts on the best way to do this?
11-11-2005, 11:09 PM
F8... I won't be able to see it... Sigh... :(
Here is my 2 cents...(I do not have seen the layout, so I might be really off...)
My choice would be #2 because you can have the image loaded while browsing for the currently showing image... Having said that, you cannot realy have 100s of images loading in the background... You've got to find the right number for organization...
You have two sorts of approaches...
#1. You go to a photo album where there is five sections(SA, SB, SC, SD, SE) and each section contains 100s images in them...
#2. You go to a photo album where there is five sections and there are sub sections(SA1, SA2, SB1, SC1, SC2, SC3, SD1, SE1, SE2) in each section(SA, SB, SC, SD, SE)...
What do you think is better for you??? When you get the answer for that question, you know how your gallery is going to be looking like... ;)
11-12-2005, 12:11 AM
I think I get the basic idea of what you're saying.... I'll try to explain it a little more clearly (eventually I'll get a Flash projector made up so people w/o the right stuff can at least see what it looks like).
Basicall the game consists of 10 categories. Each category has it's own individual image associated with it (in my case, they're pictures of postage stamps - each category has a postage stamp associated with it).
The game displays a maximum of 6 "categories" per page (like an image gallery, sort of). Then it displays arrows to view the next set of categories. So if there are 10 categories, there will be 6 on one screen, then after clicking on the arrow, it will display the remaining 4 on the next screen.
Each category then has any number of SubCategories associated with it. Each SubCategory also has its own unique image associated with it, and is displayed in the same manner as the main categories (e.g. 6 per screen, with arrows to navigate between screens to view more of them).
My big problem is this:
When viewing the CATEGORIES, if there are more than 6 categories, the user will have to download the first 6 images (on 56k this can be very slow). If they want to view the remaining 4 categories, they have to click on the arrow and download those as well.
BUT!! If after viewing the remaining 4 categories, the user wants to return to view the first 6 images, they will click on the "back" arrow and have to download the images all over again. This makes navigating between the various pages of images very slow for dial-up users, as they have to redownload the images every time they change screens.
So I don't necessarily have to load all of the images at the same time, but I'd like to have to only load them ONCE. When the game starts up, I only want the first 6 images to load, for example. When the user clicks to view the next 4 images, I want the next 4 to load. But then when returning to view the original first 6, I don't want them to have to load again. I'd rather find a way to keep the MC's and just move them off the stage or make them invisible, without having to worry about eating up a whole ton of memory by having a whole bunch of invisible MC's off the stage by the time the game is finished, and the user has viewed all of the categories and subcategories.
Is that a little more clear? I guess it's hard to picture it without seeing the actual thing, so hopefully I'll be able to find a working stopping point to post up a swf or projector to show you.
11-12-2005, 12:24 AM
Sounds like this is the gist of your problem, right???
BUT!! If after viewing the remaining 4 categories, the user wants to return to view the first 6 images, they will click on the "back" arrow and have to download the images all over again.
If that is the case, I think the old image will come from the cache...
If you do the holder_mc.loadMovie("img1.jpg"), that img1.jpg gets saved into the cache... When you do the holder_mc.loadMovie("img2.jpg"), img1.jpg will be deleted, but it is not gone... Next time when you do holder_mc.loadMovie("img1.jpg") again, Flash will pick it up from the cache... So, I don't really see any problem...
That will be 'the' true case for the browser app... It might work differently in the projector, but the loading speed from the local hard drive should not be any issue...
11-12-2005, 12:41 AM
That's a huge relief, and I probably could have saved you a lot of time and trouble if I had asked whether the "simulate download" option when testing my movie, was accurate or not!
The only reason I thought the user would have to keep downloading the images was because that seemed to be the case when i did "simulate download." If images loaded using "imageLoader.loadClip("images/"+imageName, imageMC);" are automatically cached then it looks like I don't need to worry.
Thanks for setting things straight :)
11-13-2005, 12:22 AM
Well... I am 99% sure that you don't have to worry, but I am not that good at those percentage numbers... :D
One thing I can tell you is that you SHOULD NOT depend on that simulation... That's only a guide line... You should actually test your app/site in the situation where your users are going to use whenever you can...
For example, if you are creating a Flash website...
Set up the basic structure of the site, upload it to the server and test it...
Add a couple more sections to the site, upload it and test it...
Add the gallery section and upload/test it...
Add the contact section and upload/test it...
You get the idea... ;)
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.