Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Desktop, Mobile and non-browser Environments > Projectors and CDs

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-01-2005, 07:20 AM   #11
recap
Registered User
 
Join Date: May 2005
Posts: 93
Default

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
recap is offline   Reply With Quote
Old 11-01-2005, 08:55 AM   #12
silverfish
Senior Member
 
Join Date: Oct 2005
Posts: 156
Default

hey reacap,

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)
Attached Files
File Type: zip demo2.zip (160.2 KB, 101 views)
silverfish is offline   Reply With Quote
Old 11-01-2005, 09:38 PM   #13
recap
Registered User
 
Join Date: May 2005
Posts: 93
Default

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)

thanks again!
recap is offline   Reply With Quote
Old 11-02-2005, 03:28 AM   #14
recap
Registered User
 
Join Date: May 2005
Posts: 93
Default

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)

http://www.x-head.com/PHFGame.zip

Thanks again everyone
recap is offline   Reply With Quote
Old 11-03-2005, 03:28 AM   #15
recap
Registered User
 
Join Date: May 2005
Posts: 93
Default

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.
recap is offline   Reply With Quote
Old 11-03-2005, 07:08 AM   #16
silverfish
Senior Member
 
Join Date: Oct 2005
Posts: 156
Default

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.
silverfish is offline   Reply With Quote
Old 11-11-2005, 10:57 PM   #17
recap
Registered User
 
Join Date: May 2005
Posts: 93
Default

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.

Should I:

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?

Thanks!
recap is offline   Reply With Quote
Old 11-11-2005, 11:09 PM   #18
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

Howdy...

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...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 11-12-2005, 12:11 AM   #19
recap
Registered User
 
Join Date: May 2005
Posts: 93
Default

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.
recap is offline   Reply With Quote
Old 11-12-2005, 12:24 AM   #20
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

Sounds like this is the gist of your problem, right???
Quote:
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...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:54 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.