FORUMS: list search recent posts

Several questions on complex flash site...

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ken Ross
Several questions on complex flash site...
on Dec 18, 2005 at 11:22:04 am

Okay, I am so glad I found this site, already the video tutorials and reading through older posts in the forums has helped me a lot. Thanks for reading my post, and double thanks to any who reply. Now on to the good bits.

I am taking on a huge project, mostly for myself and some friends, but also for a little pay. I am a web designer by trade, been supporting myself for a few years now since the last corporate job I had fell through when the company went bankrupt. Who likes the corporate life, anyway? Not me! I say that only to let you know I am not some highschooler looking for help in a class assignment, or eager gamer with no experience wanting someone to do something for free. I have a lot of experience with HTML and DHTML, average knowledge of server side languages (though I tend to do more copy/paste programming than writing fresh code), and am handy with photoshop. However, I am very new to flash. I've redesigned a few purchaesed templates, and made a few basic flash websites... but I am still learning.

I know how to do what I am asking in HTML, but for various reasons, as much to learn as to make the site, I want this in a flash based site. I've started 3 times and thrown away three poor attempts. In the process, I have appealed to other forums I know of, with more or less 'that's too hard to do in Flash, use HTML (or some CMS such as PHPNuke or Mambo)' as an answer. Well, I'm going to keep trying until I get it done in Flash, hopefully sooner than later - hopefully with help from someone.

Here is what I would like to accomplish - a basic flash website with little content and a login area (already designed, with non-fuctioning username/password fields and a 'log in' button). On logging in, redirect to a new flash site, though keeping the username in memory while redirecting. I thought of simply keeping it one site with different scenes or different areas on the timeline too, to make variable preservation easier - I can certainly do that if it would be easier. I saw a new flash site mostly because the 'member's area' will have a completely different look and feel.

That is my first stumbling block; having a functioning login. I thought of doing a flatfile .xml document for usernames and passwords, but that seems very unsecure. I like the looks of the MySQL>PHP>XML>Flash tute I saw on this site, so for now I think I will use a variation of that to try and get something going - though I would love any input offered on something else that may be more secure.

Along with the username and password, I would like to store several other fields - 'real name' (many people don't use real names for user names), 'location' (where they are from), 'background color', 'background image', 'subscription length' (how much longer until they have to pay again, typically every 30 days), 'credits remaining' (will explain below), 'credits spent' (again, below), and possibly several calendar-based fields (more on this below too).

That way, when the get into the member's area, it is set to their desired background color and image, and there is a small area that says "Welcome, /realname/! Your subscription is set to renew in /subscription length/ days, and you currently have /credits remaining/ credits."

I don't know how well I can get all of that working, but I haven't yet tried since watching that video tute on MySQL>PHP>XML>Flash... so hopefully it will be as easy as I now think it might be.

Once I surpass that issue, which I may be able to do now, I have a second major stumbling block. This is where those credits come in. I want an interactive booking calendar, which has a basic month by month interface at the top-level. The user can scroll through the month and see days as one of three colors (for now I am thinking white, gray, and red - I may go with another scheme, it is not too important). One color (white) indicates a day is completely open. The second (gray) indicates it is partially booked. The third (red) indicates it is totally booked.

White and Gray days are clickable, and zoom in to a view of the day, showing business hours, split into half-hour increments. Again the hours will be color coded to show if a particular time is open or booked. Any open time can be clicked on to be reserved, which brings up a dialogue asking the length of the reservation (or perhaps it may be easier to have text fields at the bottom of the day, allowing manual entry of start and end time). As soon as the reservation is confirmed (a series of 2 buttons, 'book appointment' and 'is this right' which confirms the appointment), all other users see it as booked now.

I don't want any user to see who has booked my time, or for how long - if they see me as booked from 11AM to 4PM on a given day, it may be 10 half hour appointments with different clients, or it may be 1 five-hour appointment, etc. The admin(s), however, needs to see who has requested what time. I am not sure if a separate site/interface should be used to keep things simple, or if an extra 'acccount type' field should be added in the MySQL table to allow admin accounts. Which brings up another point - should this be somehow integrated into the above table, or (I think more efficient and better suited for many reasons), have a separate MySQL table for itself?

Has anyone done Flash based calendars/resource scheduling, and would you be willing to impart some advice?

But WAIT, there's more!

The resource scheduling can be for multiple types of services, and costs different amounts of credits (here they are!) based on the type of service requested and length of time. So I need to somehow work that in there too. Also, a shopping cart interface to buy credits (a certain amount come with the subscription, but more can be purchased). And certain types of services require time to be padded (If I am called out to do on-site consulting, it will be 30 minutes both before and after, or certains services require a minimum of 2 hours to be scheduled, though it could be longer if desired, for a couple of examples).

So... tons of considerations, many of which I am sure I have not yet thought of. For now I have been fighting the simple log in procedure, and been less concerned with the remaining details. But I figure this seems to be a wonderful place to ask for advice, so here I am asking!

Again, thanks for spending the time reading this, and if you do have any advice or bits of code you can contribute, I'd appreciate it all the more!

- Ken

Return to posts index

Re: Several questions on complex flash site...
on Dec 19, 2005 at 2:07:55 pm

Ok, got some advice.

Welcome to the Cow.

#1 - Your question(s) are way too long. You get more replies if you break it down into very very small concise questions.

#2 - On the log in area. This is totally doable using Flash as a gui that would access a password via php login. Here's a snippet of code that I used once for this.

function runEnter():Void {
var logUser:LoadVars = new LoadVars();
logUser.username = _root.my_user.text;
logUser.passwd = _root.my_pass.text;
logUser.isRemember = rembr;
logUser.sendAndLoad("loginswf.php", logUser, "POST");
logUser.onLoad = function(success) {
if(success) {
if(this.auth == 'true'){
sendMessage("Failed Login, Please try again..");
_root.my_user.text = "";
_root.my_pass.text = "";

function sendMessage(theMessage:String):Void {
_root.myErr.text = theMessage;

You can use the LoadVars Class for passing a user name and password to a php script, and the script will pass back either "true" or "false" letting the user go or not. After the user pases, you can send them wherever you want.

#3 - The interactive booking area will also have to pass data between flash and a database. So the use of php will also come into play here as "the glue". I haven't done anything like that, so I have nothing to offer here and it's a lot of work.

#4 - As far as using flash for a shopping cart. Now your treading into an area in which I believe flash should NOT Do. Flash makes a great GUI, and keep in mind that this GUI is a client program. Client programs run on a users computer. Anything that runs on a clients computer can be hacked. Anything that can be hacked does not make a good shopping cart. However, if you use flash as a gui to the real back end shopping cart with lies on a php server or ASP server program, then thats ok.

So, now I have a question for you. Since your talking about membership, points, and interface.. Is what your trying to accomplish need to be web based? In other words, can it be something called RIA? Or Rich Internet Application. A RIA is a standalone software that "runs" on a members computer using the net as a pipe to communicate with. A RIA can be created with C++, Visual Basic, or with Flash as a stand alone app. The RIA gives you more power to communicate with a database directly more securely. No glue needed. All you would have to know is your database, and the program.

The reason I'm asking this is because what your asking requires advanced knowledge in Flash, PHP, XML, and Databases to be the answer. And a advanced knowledge of how all of these systems integrate.

If.. however, all your members have different systems like Linux/Mac, than never mind.. best done with PHP/Flash on the web then.

Hope this gives you a little bit of info in your quest.

Good luck.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved