21 Replies Latest reply on Apr 16, 2006 11:44 AM by jokerstyles

    I need a suggestion for my final thesis

    The_350Z Level 1
      I need your suggestion really bad.
      The project is about building a network entertainment system. A user will need to build a system by dragging and dropping items on the list to a floor map that is done in isometric view. After that they need to connect each items to make the system work.
      These items are vary, from computers to entertainment system such as receivers, dvd players, tv and so forth.

      Ive done like 50% of it, and have come to the hardest part which is connecting these items together. I feel I need to sit down and gather as much ideas as possible. I need to do it right because I don't have much time for this. I only have 2 months left.

      So this is my problem.
      Let's say I have 4 items on the stage: a speaker, a receiver, an hdtv, and a computer
      I have quite a few rules and conditions for each items here.
      For example a receiver. The rules is that a receiver can only be connected to a TV but not a computer. (sure you can but for the sake of this project.. let's just say you can't) The condition for this item is that it has 5 connectors which is 3 video out and 2 auido out.

      Somehow I need to keep checking which connector is still available and which one is not. If it's still available the next question comes, if this item can be connected to that item and so on.

      So I'm thinking I'm going to end up with a lot of if else statements, which I'm trying to avoid here.

      I need a suggestion on how to do this in the right and elegant way.

      thank you
      ps: I'm not a hardcore programmer myself, infact I just started a few months back.
        • 1. Re: I need a suggestion for my final thesis
          sneskid Level 1
          hey, interesting.

          What I would do is keep a boolean with each connection, and mark it on/off : available/taken or maybe used/free, you interpret it.

          this way, when you try to hook the cables, all you need to do if check the booleans on the destination object, instead of checking the entire setup (which could get quite intensive).

          Keep track of the progress with simple boolean variables, keep track of the relationships between objects, it'll make life easier.

          I hope that helps.
          • 2. Re: I need a suggestion for my final thesis
            Level 7

            "sneskid" <webforumsuser@macromedia.com> wrote in message
            news:e1kn68$l5b$1@forums.macromedia.com...
            > hey, interesting.
            >
            > What I would do is keep a boolean with each connection, and mark it on/off
            > :
            > available/taken or maybe used/free, you interpret it.
            >
            > this way, when you try to hook the cables, all you need to do if check the
            > booleans on the destination object, instead of checking the entire setup
            > (which
            > could get quite intensive).
            >
            > Keep track of the progress with simple boolean variables, keep track of
            > the
            > relationships between objects, it'll make life easier.
            >
            > I hope that helps.
            >

            If it were my project... I would have each element be a member of a custom
            class called "entertainmentComponent" which extends the movie class. Then,
            each different type of component could have properties like the types of
            connections. Like the previous poster mentioned, you could then have a
            boolean represent the availability of each connector.

            For each object then the checking would be...
            ----- pseudo code -----
            if (thisComponentClip.connectsTo("audio", anotherComponentClip)) {
            execute code base on connection okay
            } else {
            the two cannot connect
            }

            The custom class (which thisComponentClip and anotherComponentClip would be)
            would have a function connectTo that takes the type of connection and the
            component that is being connected to. If that component clip has (in this
            case) an "audio" connection available then it returns true... else false.

            Read up on writing custom classes... esp. those that extend MovieClip.

            Amy


            • 3. Re: I need a suggestion for my final thesis
              sneskid Level 1
              Amy that was a sexy post... love the curves on that pseudo code.

              The 350z, you may want to include a selection box letting the user specify which connection to plug the cable into. A speaker is generic, but it could go in left channel or right channel... so why not let the user choose?
              Just something extra tho.. not really required to make things work
              • 4. Re: I need a suggestion for my final thesis
                i would take a different appraoch

                Take into account male and female connectors,

                have the inputs be );subject.class-1;(
                have the outputs be );subject.class-2;(

                )association.subjects//
                sc=1.memwriteinput,sc=2
                sc=2.memwriteoutput,sc=1
                //constant.variable

                then you make a table, in your favourite table making program and the x is inputs and y is outputs

                have the graph viewable for statictics like power consumption, interferrence, voltage etc.

                that way you sexify it up like a million percent


                Kitchen stuff plus is good, very good, consume its products and ye shall be merry


                • 5. Re: I need a suggestion for my final thesis
                  The_350Z Level 1
                  Oh wow, thanks for these ideas.
                  I don't know what pseudo class is but I heard of it before and I'm not quite sure what do you mean by extending the movie class and the advantage of it.
                  I'm sure I can do some research about it, but it is also nice if somebody can give me a brief info on both.

                  @sneskid: yea I'm thinking to do surround too but I'm not sure if I have enough time to complete this.
                  But yea that's a very good idea.

                  Thanks everyone.
                  • 6. Re: I need a suggestion for my final thesis
                    Level 7

                    "The 350Z" <webforumsuser@macromedia.com> wrote in message
                    news:e1lo7t$3hr$1@forums.macromedia.com...
                    > Oh wow, thanks for these ideas.
                    > I don't know what pseudo class is but I heard of it before and I'm not
                    > quite
                    > sure what do you mean by extending the movie class and the advantage of
                    > it.
                    > I'm sure I can do some research about it, but it is also nice if somebody
                    > can
                    > give me a brief info on both.
                    >
                    > @sneskid: yea I'm thinking to do surround too but I'm not sure if I have
                    > enough time to complete this.
                    > But yea that's a very good idea.
                    >
                    > Thanks everyone.
                    >

                    It wasn't a pseudo class, I wrote "pseudo code".
                    Psuedo Code is just that - text that might appear to be code, but usually
                    isn't fully. Rather than use the specific syntax of a language, more general
                    wording is used.

                    Extneing the movie class:
                    Everything in flash is an object. A movie clip is just an object that has
                    some special qualities like and _x, _y position. When you write a class
                    that extends MovieClip you are creating an oject that inherently has all
                    traits of a movie clip... but you can add others. So, while a normal movie
                    clip has a _visible property which determines whether or not a movie clip is
                    visible, you could have your custom class have properties for things like
                    the number of audio jacks a it has, how many video jacks it has, whether any
                    of the connectors are being used.

                    The prevous poster mentioned taking into account male/female connectors...
                    but you could always buy cables to match your setup, so that seems like
                    overkill and unnecessary - maybe I am missing something -- I am not an
                    entertainment system junkie, just a computer junkie.



                    • 7. Re: I need a suggestion for my final thesis
                      The_350Z Level 1
                      oh wow, thank you that surely helps.

                      i wonder if anyone can suggest me a book or two which should I buy.
                      Im thinking to get Object-Oriented Programming with ActionScript by Brendan Hall and Samuel Wan.

                      What do you think?
                      • 8. Re: I need a suggestion for my final thesis
                        Level 7

                        "The 350Z" <webforumsuser@macromedia.com> wrote in message
                        news:e1m3jn$i73$1@forums.macromedia.com...
                        > oh wow, thank you that surely helps.
                        >
                        > i wonder if anyone can suggest me a book or two which should I buy.
                        > Im thinking to get Object-Oriented Programming with ActionScript by
                        > Brendan
                        > Hall and Samuel Wan.
                        >
                        > What do you think?
                        >

                        I have not had any experience with the book mentioned. "Flash Application
                        Design Solutions" is a good one though. It is published by "Friends of ED."
                        For the most part I spend most of my time reading FOE books or O'reilly
                        published books.

                        The title I mention is good for what I was talking about, extending the
                        movie clip class with a custom class. Then, for something like this, it
                        goes over creating a "monitoring" class that handles each of the objects in
                        it.

                        But anything that has "Object-Oriented Programming with ActionScript" right
                        in the title has a fairly decent shot of covering the same type of stuff.

                        Good luck!


                        • 9. I need a suggestion for my final thesis
                          The_350Z Level 1
                          I'm definielty going to check out the book!!
                          It sounds like that's exactly what i need.
                          I did read some articles about creating classes, it sounds really powerful.
                          I thought that class was similar as embedding an object with some properties like {_x: this._x, thisObj:this} and so on. I was wrong .

                          Thanks alot ABC
                          • 10. Re: I need a suggestion for my final thesis
                            Level 7

                            "The 350Z" <webforumsuser@macromedia.com> wrote in message
                            news:e1m7gf$n0f$1@forums.macromedia.com...
                            > Ill definielty going to check out the book!!
                            > It sounds like that's exactly what i need.
                            > I did read some articles about creating classes, it sounds really
                            > powerful.
                            > I thought that class was similar as embedding an object with some
                            > properties
                            > like {_x: this._x, thisObj:this} and so on. I was wrong .
                            >
                            > Thanks alot ABC
                            >

                            You were only sort of wrong. The Object class of AS (the mother of all
                            classes) has the ability to take on new properties like you mention. But
                            having functions that are inherent to a movie clip on your stage, like a TV,
                            reside within the Objects defining code makes sense. A TV Object should
                            know how many ins/outs it has or its watt/amp/voltage. While this stuff
                            could all be coded (at least I think) on one frame of one layer, it makes
                            more sense to have it be part of the Object itself.

                            Without a class your AS might look like
                            moveMC(myMovieClip, 200);

                            With a class, definining a moveMC function it would be more like
                            myMovieClip.moveMC(20);



                            • 11. Re: I need a suggestion for my final thesis
                              Level 7
                              "The 350Z" <webforumsuser@macromedia.com> wrote in message news:e1m7gf$n0f$1@forums.macromedia.com...
                              > Ill definielty going to check out the book!!
                              > It sounds like that's exactly what i need.
                              > I did read some articles about creating classes, it sounds really powerful.
                              > I thought that class was similar as embedding an object with some properties
                              > like {_x: this._x, thisObj:this} and so on. I was wrong .
                              >
                              > Thanks alot ABC

                              Hey there ABC. I humbly disagree with the other posters (sorry) but unless you plan on making a career out of programming it's not
                              worth all that extra work to learn OOP just to do a simple project like yours. All you need is a matrix of allowable connections
                              (imagine a table of 1's and 0's) and a function to call to check to see if your potential connection is good. (I can make an
                              example for you if you want)

                              If you are ready for learning OOP then fine but if you just need your project done I suggest you don't go down that road, it will
                              just slow you down because of the long learning curve.

                              tralfaz


                              • 12. Re: I need a suggestion for my final thesis
                                The_350Z Level 1
                                tralfaz, if you can, that would be awesome.
                                I just sent you an email.

                                if you could I'd like to see some example of your approach.

                                my email is email@ivankandi.com

                                thanks alot!!
                                • 13. I need a suggestion for my final thesis
                                  The_350Z Level 1
                                  is anybody has a different suggestion/idea?
                                  • 14. Re: I need a suggestion for my final thesis
                                    kglad Adobe Community Professional & MVP
                                    i created a somewhat similar project for website (www.ltpcs.com), a computer vending website. the heart of that project was a "configurator" page where users could configure their own computer.

                                    however, some computer parts are incompatible (eg, a 754 pin mobo and 934 pin cpu) and the client wanted the website to automatically grey out incompatible choices for each part picked (if there were any incompatible items).

                                    i used an array associated with each part that contained a list of incompatible items (and that list could be empty if there were no incompatible items). each time a part was selected i'd loop through its array and grey-out the incompatible items.

                                    now, when i started this project it seemed better to use an array of compatible objects instead of incompatible ones. but that turned out to be more difficult and time-intensive to check.

                                    in your situation i'm not sure which would be better. either track allowable connections or disallowable connections. pick the option that leads you to track the least number of items.

                                    so, if you have significantly fewer total disallowable connections, track the disallowable connections for each item. if you have significantly fewer total allowable connections, track the allowable connections for each item.
                                    • 15. Re: I need a suggestion for my final thesis
                                      Level 7

                                      "The 350Z" <webforumsuser@macromedia.com> wrote in message news:e1pn6k$637$1@forums.macromedia.com...
                                      > tralfaz, if you can, that would be awesome.
                                      > I just sent you an email.
                                      >
                                      > if you could I'd like to see some example of your approach.
                                      >
                                      > my email is email@ivankandi.com
                                      >
                                      > thanks alot!!

                                      I'll get back to you as soon as I can. It is tax deadline day today! What a pain. No more Flash until taxes get done.
                                      The matrix of good/bad connections is the easy part. Can you explain what the user will do? Click objects, drag lines, choose from
                                      list or what?
                                      I will make a quick demo of it that you can expand on. Just need to know the concept more.
                                      tralfaz


                                      • 16. I need a suggestion for my final thesis
                                        The_350Z Level 1
                                        Hi,

                                        Thank you I appreciate that alot.

                                        So basically I have this menu with a list of items (i have a total of 20 items). Also I have a floor map (in isometric view) that represents a room. Basically you have to choose an object from the menu and you drag it to the map. Just drag whatever items you want to the map.

                                        After that comes the connecting part. First a user will have to click on an object and pressing a spacebar will open a menu for that item. One of the options is called "CONNECT" after choosing that, s/he has to choose another object to connect.

                                        This is where -I think- the first function should run. Check whether these 2 items are compatible with each other (for example it's impossible to connect a web cam with a receiver). Then I'd like to have the second function to check whether or not a connector is still available on both items. For example (to connect an ipod and a computer, a connector in ipod should be open as well as in the computer, if one of them is unavailable then these items can't be connected). After these 2 items are connected, i should be able to show to a user -visually- that these 2 items have been connected, maybe with a thin line that connects these 2 together. To disconnect -I'm thinking- just click on the line that connects these two.

                                        Like a receiver it has more than one connectors, and it can be complex because there are a few different types of connectors in a receiver, for example: audio has 2 available spots (connectors), while video has 3. For a different equipment such as a tv, it can be vary, a tv can have 2 connectors: one is for a dvi, one is for cable.

                                        I think I'm going to need a function that -let's say- when I click on an ipod, it will recogniaze it as an ipod then when I'm trying to connect it with my computer that function will know which port an ipod needs to be connected, in this case a usb connector on the computer, check if the USB connector is available or not.

                                        Last,
                                        I have the GUI, the drag and drop part working okay. I can tell flash to remember what object that I just clicked. I can do copy and paste on a selected item as well. So the connecting part is that confuses me.

                                        Thanks alot tralfaz!!! I just need a concept so I can expand it even further, however please take your time with the tax, I know how troublesome it could be.
                                        • 17. Re: I need a suggestion for my final thesis
                                          Level 7
                                          <...>
                                          > Last,
                                          > I have the GUI, the drag and drop part working okay. I can tell flash to
                                          > remember what object that I just clicked. I can do copy and paste on a selected
                                          > item as well. So the connecting part is that confuses me.
                                          >
                                          > Thanks alot tralfaz!!!

                                          OK.. my taxes are done so now I need to work on some Flash stuff to forget about that!

                                          One question about the concept.. is it a test of the user to see if they know what stuff goes together or should the program just
                                          prevent wrong connections?

                                          I would like to see your GUI that you have now if you want to show it. (email to where you did before) but I will work on it now to
                                          get the connection matrix set up.
                                          tralfaz






                                          • 18. Re: I need a suggestion for my final thesis
                                            jokerstyles Level 1
                                            WOW i made it throught this entire thread, and im still confused. Jokerstyles is about to give up on A.S. and hire someone to do my site. Anyone interested in a new project?
                                            • 19. Re: I need a suggestion for my final thesis
                                              The_350Z Level 1
                                              hey tralfaz, I sent it to your email address.
                                              hope you got it. let me knwo if you have questions.

                                              jokerstyles .. confused about what?
                                              • 20. Re: I need a suggestion for my final thesis
                                                Level 7
                                                "jokerstyles" <webforumsuser@macromedia.com> wrote in message
                                                news:e1s4ei$38n$1@forums.macromedia.com...
                                                > WOW i made it throught this entire thread, and im still confused.
                                                > Jokerstyles is about to give up on A.S. and hire someone to do my site.
                                                > Anyone interested in a new project?

                                                How about me...


                                                • 21. Re: I need a suggestion for my final thesis
                                                  jokerstyles Level 1
                                                  show me some of your work, any links to any sites or if you want to send some .swf you can email me. jokerstyles101@yahoo.com