View Full Version : Tutorial Request: Flash and C++
Flash Gordon
07-05-2006, 12:14 AM
Hello,
I was hoping someone would want to take 10 minutes to make a tutorial for AS[org] about intergrating Flash with C++. I think it would be really neat not to depend upon Zinc, but to:
Make a Flash GUI
Have a C++ backend that could write to a text file locally (http://www.cplusplus.com/doc/tutorial/files.html)
use a binder to create 1 file from the swf and exe
Maybe it is just me, but I think that would kick ass.
Cheerio,
:)
MichaelxxOA
07-05-2006, 12:23 AM
Why C++?
Would you mind it being Java? That way you at least retain some portability.
Michael
ps. What up! Where you been?
Flash Gordon
07-05-2006, 12:44 AM
Oh...I've just been chillin' and lurking mostly. I'll be around a little more in the next few days.
As for the tutorial, I thought that Java was an interpretive language (like asp, php, perl*). The reason I suggested C++ was because:
1) it is compiled
2) it is a pretty common language
If java is interpretive, wouldn't that mean it needs a webserver or it is like perl where it can be compiled? If Java is interpretive, Flash talking to Java would be no different than Flash to PHP/ASP/JavaScript/etc, right?
Also, I remember Eric (mmm...pi...) talking about making a C++ engine for a foot pedal that control a flash interface. I suppose that makes me a little partial to C++. Also, someone else recently asked about the 2. I thought it was a little kinky that AS[org] has nothing on the subject matter.
I suppose to answer your question, no of course I don't mind :). I'm always interested in learning new things.
MichaelxxOA
07-05-2006, 12:49 AM
Java is interpreted by the Java Virtual Machine (which is available on most, if not all, operating systems), but it still gets compiled down to bytecode.
That bytecode is interpreted by the, architecture dependent, virtual machine, written in C.
Java is like C++ in so many ways other than the fact that C++ gets compiled down to machine code, Java has full access to the machine that it is running on (within reason), so you'll be more than able to get what you'd like in Java rather than C++.
... does that make any sense?
Languages like PHP and Pearl are scripting languages. Java and Actionscript are interpreted languages, so it's not nearly the same thing.
Anyway, hit me up we'll talk about it, and decide if it's what you'd like, and whether I have the time to write it ;). michael
I'd avoid C++ for 2 simple reasons. 1 - DLL's, DLL's DLL's, ok...honestly, just one reason. Most hosting services will not allow you to install a DLL on the server, or if they do, they'll charge you an arm or a leg for it.
Flash Gordon
07-05-2006, 01:04 AM
Most hosting services ....
Local :D
:p
MichaelxxOA
07-05-2006, 01:05 AM
so... Java it is? haha, noob
Michael
Flash Gordon
07-05-2006, 01:07 AM
Sure, I assume the same concepts would apply to either Java or C++, right? Just like posting data to ASP or PHP is the exactly same on the Flash end. It is just a matter of how it is recieved.
I'm talking as simple as in Flash you have
enter the file name to write to: fudcake.txt <-- user input
enter what you want to write: foo bar foo bame mike sud cat <-- user input
then Java (C++) takes the "POST"ed data and does it's business.
MichaelxxOA
07-05-2006, 01:08 AM
... lol, yeah actually you're right. We'll see how that works out. I'll try really hard to get something together, but ask Cota... I don't know how that's going to work out.
Michael
if java, wouldnt you use remoting...since I havent touched either java or remoting...its more of a question...
Flash Gordon
07-05-2006, 01:15 AM
k. I'll be waiting. If you get it happening may I can write the C++ code for it (or at least copy and paste it from the link above :p)
MichaelxxOA
07-05-2006, 01:25 AM
alright, it'll be a while for sure though... unless someone else is wanting to do it.
Michael
If I knew java I would offer, but I dont have time to learn a new language.
Flash Gordon
07-05-2006, 01:26 AM
I'll do it :p
I might get to it faster than you. I image it can't be very hard at all! (i hope).
@cota, you know C or C++.... Do you know how to "post" vars to an application like that?
MichaelxxOA
07-05-2006, 01:28 AM
well you know my sn so you can just hit me up if you have questions along the way.
Michael
Flash Gordon
07-05-2006, 01:31 AM
Done with part one,
now I just have to learn java/C :p
Flash Gordon
07-05-2006, 01:37 AM
Hm.....I think I am approaching this wrong. It is not the same as Flash to PHP to produce a result.
I belive I have to build a C++/Java application that has Flash inside of it. This is not quite as easy.
Okay...so apparently, I have no idea where to begin.
:confused:
EDIT:
In the help section in flash MX 2004 under flash javascript is a section on using C or C++ with flash.
not sure what's the target !
do i understand right
you wana make a tool (an exe in C++)
you start it
give it a target SWF
and you get a projector so you are abel form inside the SWF(the newli created projector) to save file to disk ?
i am on this C++ soff since nearly 2 weeks and still not started whit it :p
but as fare i can see it's prety simple (till a certain point)
and as fare you can use C++
in M$ visual C++
i can click clack (like draging component's on stage in flash)
and i have a shockwaveplayer component on "stage"
instead of loading an SWF from the disc you simply "concate" the exe and SWF
the exe is let's say 1Mb long and the rest (will by then ) the SWF wich he shoud by abel to "load" as woud it by a normal file on disc and play it
to realize this is definetly not a big deal but you will need to by at an advanced level in C++
Flash Gordon
07-05-2006, 02:28 AM
yea....you got the main idea. Basiclly, I'd like to be able to do what Zinc can do, but without it.
target/goal: Flash to write to a txt file (locally) with the help of C++.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.