-
Hi,
I am trying to design a GUI in Flash with the constraint that it needs to communicate with a C++ program. Basically, when a button is pressed in Flash I want to call a C++ method.
So far, I haven't seen anything about Flash/C++ interface.
If it isn't possible, what about Java?
Thanks,
-YS
-
You have a very good question. It should be easy to send variables to a flash GUI from your program; all your program has to do is print out the correct header-type and the variable &name=value pairs. The problem comes when you want to send data to the C++ program. I know with Java, the reason for the TomCat server is to get the string and variables from a request and make the java program understand them. I don't know if you know much about JSP or Serlets, but i don't think that you could interface with a Java program on your server unless your host supports JSP.
Anyway, as far as C and C++ goes, I have not seen much info about CGI programming with them either (I am guessing that you are using C++ on the server, not on a stand alone app; the process would be mostly the same though). I was in the book store the other day though and found an O'rilly book about "CGI programming with Perl and C". It only had a few chapter about CGI with C, but that could get you started.
Good luck, I look forward to any other info in this topic.
-
Thanks Zacvin. I'll look at the book you mentioned.
-YS
-
Monkey Wrangler
Could you use a text file as an intermediary between the two? Just a thought...
- Monster
-
That is really a good idea! Of course, it would be slow compared, but it might work. Flash can not write to a text file, so you would have to have a CGI script for two way communication. You could make a generic Perl script that would take the variables, the file name, and the proper C++ or Java program to invoke. After the file was written, Flash could take it from there.
The only two problems that I see 1)the speed factor, since you would call a CGI program, write to a file (often slow), and only then call your program. 2) Secondly, if you are using the same file, and two people called it at the same time, there would be a problem. You could either lock the file, or you could use temp files with a random generated suffix (like email619879529.txt) that would collapse after use.
Anyway, if you don't have tons of traffic, I think that the speed problem might be OK.
Great idea
-Zach
-
Monkey Wrangler
yeah, that's what I meant...
Thanks for taking that to the next step. I'm not a cgi programmer (yet another open box on the "things to learn" list), but that just seemed to make some ammount of sense.
- monster.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|