12 Replies Latest reply on Apr 18, 2006 9:01 AM by Wolf_van_Ween

    Flash and C++

    Star_Tail_Pro Level 1
      right i have a big problem. Someone suggested to me that i should send data to c/c++ from flash. The sending the data bit i think i can do but this is where it goes down hill. I know ow to use c++ to programme but i cannot find an half decent website that will tell me on how to get c/c++ on to my server and work. Thing is i don't even know where to start. So i know that no body will answer but if you do have an idea on how to do it please, please tell how to do it i am litterally going insane.
        • 1. Re: Flash and C++
          Level 7
          Are you hosting a flash player within a c/c++ program? Or are these
          separate programs? really need more info about what you're trying to do and
          why before we can give you an answer.

          • 2. Flash and C++
            Star_Tail_Pro Level 1
            >>Are you hosting a flash player within a c/c++ program?
            No, they are seprate bascially i am trying to send data to a seprate c/c++ file.
            >>need more info about what you're trying to do
            >>and why before we can give you an answer
            I have liitle flash programme that I have built that acts like a language book (something for GCSE revision) for french and german (so far i have only built the german). Because you have to type in your oen answer, it had to be long term so i couldn't use Shared Objects and so i wanted flash to create a new file so on the owners pc as i don't really have that much mermory on my server. I know that flash was not able to create a file so i looked at different scripts.
            I have not decided weather it will be downloaded or it runs in a pop - up browser or in the browser; so i want to keep it as a .swf for now. I knew that c/c++ did what i want but how do you get it onto the server and work? (i decided i have to get it working on the server first before i do anthing else).

            EDIT: just remembering something. flash is going to send an array to c++ which will write over that array in file. I probabl have separate all the arra that is going to be edited?

            Thanks for your reply as well at least it looks like one person knows of c/c++
            • 3. Re: Flash and C++
              Level 7
              I definitely know C/C++ ... but I'm afraid I don't understand what it is
              your are trying to do. Sorry.

              • 4. Flash and C++
                Star_Tail_Pro Level 1
                I went into a deep description for nothing .
                Right diagram time.

                flash --creates--> new array --sends-to-> C/C++ --creates /or/ writes-> to a file
                --from-> input box
                flash --accsess-> the file

                i am going to have to seprate the array that i am changing from the .as file to work b the looks.
                (this is the othe way i was thinking of(if possibile))
                .as file -- has 3 arrays
                C/C++ --edits--> the one array --in-> the file

                is this simple or this simple

                EDIT: just realiseing again. I was wondering how do ou get .cpp/.c file to work on the server. I know somebody that had to built there website of c/c++ coding.
                • 5. Flash and C++
                  So basically you are wanting to simply send an array from flash to C/C++ and then have C/C++ do the rest, then laster on flash can use the file you have just made??

                  Are you trying to send data from a flash movie that is embedded in the C/C++ App or are they indpendant?
                  • 6. Re: Flash and C++
                    Wolf_van_Ween Level 1
                    A Flash movie runs inside the user's browser, locally.
                    It cannot write files on the server. Security reasons. Full stop.
                    The only way to get data into another program running on a server is to use a call through http:
                    Your C++ program would need to listen on a port on the server.
                    • 7. Flash and C++
                      Star_Tail_Pro Level 1
                      >>It cannot write files on the server
                      i knew flash cannot wrie to the server
                      >>Security reasons. Full stop
                      what security reason. In fact you can write to the server just not the person pc.

                      its independant

                      so how would i do it

                      Flash will be downloaded onto the pc. This will solve a couple of sercurity reasons.
                      -> i do not want it to be an exe as i want it to be plug and play sort of thing
                      ->he swf will play in the flash player
                      -> an input box inside the swf will have things written into it
                      ->flash will send the array of data from the input box
                      -->C++ file will be downloaded with it
                      -> the array will be sent to the C++ file
                      -->C++ will right the array to the new file
                      • 8. Re: Flash and C++
                        Wolf_van_Ween Level 1
                        Star Tail Pro. I really have a hard time understanding you.

                        > "Flash will be downloaded onto the pc"
                        ok, and how does the user play the Flash movie? Or are you yourself the user?

                        > "flash will send the array of data..."
                        using what function in Flash?

                        > "C++ file will be downloaded with it"
                        is it all zipped together and do your users trust you and install exes on their machines or how? Or are you planning to write browser extensions?
                        • 9. Re: Flash and C++
                          Star_Tail_Pro Level 1
                          flash sens an array to c++/c --> c/c++ writes the array into the file
                          flash lettters access is.

                          all i want to know is how do u build c++ when the swf is independant
                          • 10. Re: Flash and C++
                            Wolf_van_Ween Level 1
                            Sorry, Star Tail Pro. I give up. I really don't understand you.
                            I hope others here do. Good luck.
                            • 11. Re: Flash and C++
                              Star_Tail_Pro Level 1
                              1.can c++ work on a server
                              2.can c++ code be downloaded on to pc and work
                              3.if no than what will?
                              4.i do not want an exe file, they will be separate
                              • 12. Re: Flash and C++
                                Wolf_van_Ween Level 1
                                Ok, I'll give it another try.
                                C++ is a programming language. It has to be translated into an executable by a compiler. Therefore
                                1. Yes, if the server runs under an operating system for which a C++ compiler exists. If you are talking about a hosting server on the internet, usually it's a UNIX/Linux or Windows system, and for both such a compiler exists. So, yes you can have your code work on a server. Whether you do have the necessary rights to install that code I don't know. Most providers don't allow that.
                                2. Sure, you would need to provide differently compiled versions for the most common operating systems - Windows, Linux, Mac
                                3. There is no difference between a program written in C++ and any other language. Flash has the advantage that most users have the program already installed that is required to execute the code (inside their browser)
                                4. If you are not happy with Flash alone, you will need some other kind of executable, whether you like it or not.
                                Has that been of help?