A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Need HELP on how to proceed with this database/flash project...

  1. #1
    Senior Member
    Join Date
    Feb 2001
    Location
    MD
    Posts
    107

    Need HELP on how to proceed with this database/flash project...

    OK i need some guidance as to how i should begin to proceed with a project i just recieved.

    Project:

    I work for a huge healthcare IT department. We have hundreds of servers with an equal number of database machines. Currently the only way we have to notify people of server downtime is through an email communication. The project i have been given is to design/build an SQL database backend running a flash movie to show the schema for the servers, and show which machines are down or when there going to go down.

    A manager of a team will be able to log in to a web page, add new machines in their group, name the machines, what O/S the machine is running, if its down or up, or schedule downtime.

    That part is easy. The hard part for me is understanding how i am going to be able to build a flash movie to be driven from the data in the database. In my mind i am going to need to make generic animations of servers going down maybe, and construction of the scheme of all the machines. But im going to need to have lines connecting certain servers to certain DB machines. And i dont see how i can keep the animations and movie generic enough to be able to work for any department server structure, but still make it real time and be able to create a movie on the fly for each department, and draw lines connecting machines together to show connections.

    I see this being a HUGE scope of a project. So i am starting small with just m y web teams machines. I have the backend SQL built with user tables, machine tables that lists server names, whether it is a web machine or DB machine, tyoe of hardware (i.e. router or server), O/S etc. But im just not seeing how im going to be able to create a generic flashy movie to show the construction of all of this, and how it all links together. Because im going to have to repeat this for HUNDREDS of teams throughout my company so it has to run all off the SQL data.

    My head hurts:/ input needed
    Nick

  2. #2
    disMemberEd Skorp|oN's Avatar
    Join Date
    Mar 2001
    Location
    Romania
    Posts
    167
    Wow... and I thought my project was tough...

    Well, as I see it, since you have the back end already (and I think that's a big part of the job), and I presume you do know how to communicate with the database (communicating with an off-line database is my project, and I can tell you it's a lot tougher), you only need to design something that can mold itself to variables it receives from the database...

    A couple of ideas:

    -there could be a movieclip (let's say... "machine") with a couple of frames, each being a representation of a specific piece of equipment. Based on a field in the database, you could jump to the frame which represents the machine you are targeting;
    -a database query will return (I presume) a number of records which you can loop through, and find out how many of each type of machines you must display on-screen;
    -how you get Flash to tell which department/structure it should query is up to you... my first thought would be a tight integration with PHP, and remember you can change variables in ActionScript from a web-page with JavaScript - I assume that the swf's will be hosted by a web browser... if that's not the case... well, your job is not too different from mine;
    -after you have the query results and the individual machines with their corresponding variables, you just need to draw them on the stage... I'd say at different heights, or whatever ideas of the sort you might have, and connect them with lines drawn with the drawing API... that's not so difficult;
    -after this first step has been done (say, when the movie starts running), you only need to requery from time to time the database and update only the status and connections of each machine - each frame in the "machine" movie clip can contain a movie clip with a couple of frames representing the state, with generic names like "down" etc.;

    Have I got anything right or have I gone haywire? Post something back and maybe we can discuss the specifics - it's kinda hard to look at everything at once... especially since I don't know if I understood exactly what you want to do.

    Cheers!

  3. #3
    Senior Member
    Join Date
    Feb 2001
    Location
    MD
    Posts
    107
    Hye there-

    thanks for the input.

    I think the main, #1 big problem i have is:

    How can i have an SQL table with a field called "number of items", and make flash do something based on how much that number is?

    For example. Say the value i have in the DB is 5 (for 5 servers). How can i use actionscript in flash to say "ok there is suppose to be 5 servers, only show 5 animations of servers"?

    Maybe that wasnt clear. Say i want to have an animation of a server room being built, but only want as many servers "built" in the movie as the number returned from the database. grr its hard to explain this, but do you get what im trying to say? I just dont see/get how i can have a generic animation in the flash movie of a server being constructed, but only have that animation play the # of times of the # returned from the database.

    any help?
    Nick

  4. #4
    gotta bounce solomatrix's Avatar
    Join Date
    Mar 2002
    Location
    Naptown
    Posts
    225
    I've been working on a similar project for the last 3 summers. I work for a school district and we needed a way to show everyroom in every school and have it show how many computers, how many ports, printer locations, dataframe locations, switch to patch information, rooms with work orders, etc.

    Basically I just got the CAD drawings for each school and started from there. Every room had a unique 'location ID' in the database so I drew a movieclip inside every room with an instance of 'btn_xxxx' (where 'xxxx' is the locid, ie. 'btn_1325'). Then I drew a textbox over each room and named it txt_xxxx, coinsiding with the same xxxx as the movieclip.

    Then I just kept adding frames when I wanted the rooms to do different things/show different text. Also I made the textboxes clickable and they link to an html popup that shows everything about that location (room) from the database.

    As far as your 5 server question goes this is what I would do. Physically make them a movie clip in flash (give them each a unique instance like ser_'location'_1, ser_'location'_2, etc.) and put more than you think you'll ever need in the room. Then have them invisible when it loads until it gets information from the database that it's really there, then have it appear.

    We implement new things all the time and a lot of the time, at first, I have no clue how to go about doing things. The hardest part is having a sufficient backend, without that you're not going to be able to do much at all.

    If you have any other questions let me know.
    Hope this helps.

    *edit* Email me and I can probably hook you up with some screenshots of what I'm talking about.
    Last edited by solomatrix; 06-03-2004 at 11:27 AM.
    Solo

  5. #5
    Senior Member
    Join Date
    Feb 2001
    Location
    MD
    Posts
    107
    Many thanks-

    I am most curious about the technique you described to have things invisible and then show. If i had a main movie, with 6 layers, and each layer had a movie clip animation (which is duplicated on each of the 6 layers) of a server being built...

    How do i hide them when the movie first loads?

    Second, i will only be getting a single number back, i.e. 5, for how many records were returned. How can i somehow with action script say "ok were suppose to have 5 animations, make visible only 5 layers"? Since i dont think each one will have a seperate name at first, just one total record set result.

    Thats the part im most confused about.

    I will shoot you an email shortly, i appriciate the help and any more insight you can give me.




    Originally posted by solomatrix
    I've been working on a similar project for the last 3 summers. I work for a school district and we needed a way to show everyroom in every school and have it show how many computers, how many ports, printer locations, dataframe locations, switch to patch information, rooms with work orders, etc.

    Basically I just got the CAD drawings for each school and started from there. Every room had a unique 'location ID' in the database so I drew a movieclip inside every room with an instance of 'btn_xxxx' (where 'xxxx' is the locid, ie. 'btn_1325'). Then I drew a textbox over each room and named it txt_xxxx, coinsiding with the same xxxx as the movieclip.

    Then I just kept adding frames when I wanted the rooms to do different things/show different text. Also I made the textboxes clickable and they link to an html popup that shows everything about that location (room) from the database.

    As far as your 5 server question goes this is what I would do. Physically make them a movie clip in flash (give them each a unique instance like ser_'location'_1, ser_'location'_2, etc.) and put more than you think you'll ever need in the room. Then have them invisible when it loads until it gets information from the database that it's really there, then have it appear.

    We implement new things all the time and a lot of the time, at first, I have no clue how to go about doing things. The hardest part is having a sufficient backend, without that you're not going to be able to do much at all.

    If you have any other questions let me know.
    Hope this helps.

    *edit* Email me and I can probably hook you up with some screenshots of what I'm talking about.
    Nick

  6. #6
    gotta bounce solomatrix's Avatar
    Join Date
    Mar 2002
    Location
    Naptown
    Posts
    225
    I have to admit I'm much more of a designer than a coder but it would be something like this.
    code:
    var locID = 'room identifier from database';
    var servers = 'number of servers from database';
    for (i=1; i<servers+1; i++) {
    ["ser_"+locID+"_"+i]._visible = true;
    }
    //where the server movie clips are named: ser_XXXX_X

    I'm horrible at syntax and have gotten a lot of help from friends and from this board.
    Solo

  7. #7
    Senior Member
    Join Date
    Feb 2001
    Location
    MD
    Posts
    107
    Originally posted by solomatrix
    I have to admit I'm much more of a designer than a coder but it would be something like this.
    code:
    var locID = 'room identifier from database';
    var servers = 'number of servers from database';
    for (i=1; i<servers+1; i++) {
    ["ser_"+locID+"_"+i]._visible = true;
    }
    //where the server movie clips are named: ser_XXXX_X

    I'm horrible at syntax and have gotten a lot of help from friends and from this board.
    i...dont...get...it I am emailing you now... thanks
    Nick

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center